chore(deps): update module github.com/containers/podman/v4 to v5 [security] #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v4.9.3
->v5.2.4
GitHub Vulnerability Alerts
CVE-2024-1753
Impact
What kind of vulnerability is it? Who is impacted?
Users running containers with root privileges allowing a container to run with read/write access to the host system files when selinux is not enabled. With selinux enabled, some read access is allowed.
Patches
From @nalind . This is a patch for Buildah (https://github.com/containers/buildah). Once fixed there, Buildah will be vendored into Podman.
Reproducer
Prior to testing, as root, add a memorable username to
/etc/passwd
via adduser or your favorite editor. Also create a memorably named file in/
. Suggest:touch /SHOULDNTSEETHIS.txt
andadduser SHOULDNTSEETHIS
. After testing, remember to remove both the file and the user from your system.Use the following Containerfile
To Test
Testing with an older version of Podman with the issue
As part of the printout from the build, you should be able to see the contents of the
/' and
/etcdirectories, including the
/SHOULDNOTSEETHIS.txtfile that you created, and the contents of the
/etc/passwdfile which will include the
SHOULDNOTSEETHISuser that you created. In addition, the file
/BIND_BREAKOUTand
/etc/BIND_BREAKOUT2` will exist on the host after the command is completed. Be sure to remove those two files between tests.Neither the
/BIND_BREAKEOUT
or/etc/BIND_BREAKOUT2
files should be created. An error should be raised during the build when both files are trying to be created. Also, errors will be raised when the build tries to display the contents of the/etc/passwd
file, and nothing will be displayed from that file.However, the files in both the
/
and/etc
directories on the host system will be displayed.Testing with the patch
Use the same commands as testing with an older version of Podman.
When running using the patched version of Podman, regardless of the
setenforce
settings, you should not see the file that you created or the user that you added. Also the/BIND_BREAKOUT
and the/etc/BIND_BREAKOUT
will not exist on the host after the test completes.NOTE: With the fix, the contents of the
/
and/etc
directories, and the/etc/passwd
file will be displayed, however, it will be the file and contents from the container image, and NOT the host system. Also the/BIND_BREAKOUT
and/etc/BIND_BREAKOUT
files will be created in the container image.Workarounds
Ensure selinux controls are in place to avoid compromising sensitive system files and systems. With "setenforce 0" set, which is not at all advised, the root file system is open for modification with this exploit. With "setenfoce 1" set, which is the recommendation, files can not be changed. However, the contents of the
/
directory can be displayed. I.e.,ls -alF /
will show the contents of the host directory.References
Unknown.
CVE-2024-9407
A vulnerability exists in the bind-propagation option of the Dockerfile RUN --mount instruction. The system does not properly validate the input passed to this option, allowing users to pass arbitrary parameters to the mount instruction. This issue can be exploited to mount sensitive directories from the host into a container during the build process and, in some cases, modify the contents of those mounted files. Even if SELinux is used, this vulnerability can bypass its protection by allowing the source directory to be relabeled to give the container access to host files.
Release Notes
containers/podman (github.com/containers/podman/v4)
v5.2.4
Compare Source
Security
RUN --mount
arguments to a Dockerfile being built.Misc
v5.2.3
Compare Source
Bugfixes
pasta
network mode.:idmap
mount option was used.Misc
v5.2.2
Compare Source
Bugfixes
/home
(#23515).Misc
v5.2.1
Compare Source
Bugfixes
Misc
v5.2.0
Compare Source
Features
libkrun
as a backend for creating virtual machines on MacOS. Thelibkrun
backend has the advantage of allowing GPUs to be mounted into the virtual machine to accelerate tasks. The default backend remainsapplehv
..build
files, which allows images to be built by Quadlet and then used by Quadlet containers..container
files now support two new fields,LogOpt
to specify container logging configuration andStopSignal
to specify container stop signal (#23050)..container
and.pod
files now support a new field,NetworkAlias
, to add network aliases.container.d
,pod.d
) and truncated unit drop-ins (unit-.container.d
) (#23158).podman system check
, which will identify (and, if possible, correct) corruption within local container storage.podman machine reset
command will now reset all providers available on the current operating system (e.g. ensuring that both HyperV and WSLpodman machine
VMs will be removed on Windows).Changes
.image
units now have a dependency onnetwork-online.target
(#21873).--device
option topodman create
andpodman run
is no longer ignored when--privileged
is also specified (#23132).podman start
andpodman stop
commands no longer print the full ID of the pod started/stopped, but instead the user's input used to specify the pod (e.g.podman pod start b
will printb
instead of the pod's full ID) (#22590).podman machine
on Linux now usevirtiofs
instead of9p
for mounting host filesystems. Existing mounts will be transparently changed on machine restart or recreation. This should improve performance and reliability of host mounts. This requires the installation ofvirtiofsd
on the host system to function.--squash
and--layers=false
options topodman build
at the same time is now allowed.--volume-driver
option topodman machine init
is now deprecated.Bugfixes
--sdnotify=healthy
option could panic when started (#22651).--sdnotify=healthy
option that exited quickly would sometimes return an error instead of notifying that the container was ready (#22760).podman system reset
command did not remove the containers/image blob cache (#22825).--cgroups=disabled
option was specified at container creation time (#20910)./etc/hosts
file in a container was not created with a newline at the end of the file (#22729).podman start
command could sometimes panic when starting a container in the stopped state.podman system renumber
command would fail if volumes existed when using thesqlite
database backend (#23052).podman container restore
command could not successfully restore a container in a pod.podman diff
would suggest using the--latest
option when using the remote Podman client (#23038).podman events
command was rarely unable to report errors that occurred (#23165).--cidfile
option.podman run
andpodman start
commands could throw strange errors if another Podman process stopped the container at a midpoint in the process of starting (#23246).podman system service
command could leak a mount on termination.podman images
(#23120).podman auto-update
andpodman system df
commands could fail when a container was removed while the command was running (#23279).podman machine init
command could panic when trying to decompress an empty file when preparing the VM image (#23281).podman ps --pod
andpodman pod stats
commands could sometimes fail when a pod was removed while the command was running (#23282).podman stats
andpodman pod stats
commands would sometimes exit with acontainer is stopped
error when showing all containers (or pod containers, forpod stats
) if a container stopped while the command was running (#23334).podman play kube
command could sometimes not properly clean up their network stacks (#21569).API
Misc
podman build
command when the-f
option is given, but points to a file that does not exist, have been improved (#22940).v5.1.2
Compare Source
Bugfixes
podman machine
volumes into the virtual machine when using the Apple hypervisor (#22569).podman top
would show the incorrect UID for processes in containers run in a user namespace (#22293)./etc/hosts
and/etc/resolv.conf
files in a container would be empty after restoring from a checkpoint (#22901).--pod-id-file
argument topodman run
andpodman create
did not respect the pod's user namespace (#22931).CONTAINER_CONNECTION
environment variable would lead to a panic.Misc
podman machine
using the Apple hypervisor now wait 90 seconds before forcibly stopping the VM, matching the standard systemd shutdown timeout (#22515).v5.1.1
Compare Source
Bugfixes
Misc
v5.1.0
Compare Source
Features
podman machine
on macOS with Apple silicon can now use Rosetta 2 (a.k.a Rosetta) for high-speed emulation of x86 code. This is enabled by default. If you wish to change this option, you can do so incontainers.conf
.podman update
command are now persistent, and will survive container restart and be reflected inpodman inspect
.podman update
command now includes a new option,--restart
, to update the restart policy of existing containers..container
files now support a new key,GroupAdd
, to add groups to the container.podman inspect
.podman run --mount type=image,...
now support a new option,subpath
, to mount only part of the image into the container.healthcheck_events
, has been added tocontainers.conf
under the[engine]
section to allow users to disable the generation ofhealth_status
events to avoid spamming logs on systems with many healthchecks.io.podman.annotations.kube.image.automount/$CTRNAME
annotation (where$CTRNAME
is the name of the container they will be mounted into).podman info
command now includes the default rootless network command (pasta
orslirp4netns
).podman ps
command now shows ports from--expose
that have not been published with--publish-all
to improve Docker compatibility.podman runlabel
command now expands$HOME
in the label being run to the user's home directory.podman network list
, has been added to thepodman network ls
command.podmansh
can now be set incontainers.conf
.podman-setup.exe
Windows installer now provides 3 new CLI variables,MachineProvider
(choose the provider for the machine,windows
orwsl
, the default),HyperVCheckbox
(can be set to1
to install HyperV if it is not already installed or0
, the default, to not install HyperV), andSkipConfigFileCreation
(can be set to1
to disable the creation of configuration files, or0
, the default).Changes
podman kube play
that does not include animagePullPolicy
and does not set a tag for the image, the image is now always pulled (#21211).podman kube play
, pod-level restart policies are now passed down to individual containers within the pod (#20903).--runroot
global option can now accept paths with lengths longer than 50 characters (#22272).podman update
command now emits an event.Bugfixes
--userns=keep-id:uid=0
option topodman create
andpodman run
would generate incorrect UID mappings and cause the container to fail to start (#22078).podman stats
could report inaccurate percentages for very large or very small values (#22064).rbind
instead ofbind
, meaning recursive mounts were allowed by default (#22107).podman machine rm -f
command would fail to remove Hyper-V virtual machines if they were running.podman ps --sync
command could sometimes fail to properly update the status of containers.:idmap
option would sometimes be inaccessible with rootless Podman (#22228).:U
option would have their ownership changed to the owner of the directory in the image being mounted over (#22224).--force
option did not work when multiple arguments were given to the command and one of them did not exist (#21529).pause.pid
file in an incorrect directory (#22327).containers.conf
(#22561).podman kube down
command would not respect theStopTimeout
andStopSignal
of containers that it stopped (#22397).podman stop
finished stopping the container (#19629).podman farm build
command would not updating manifests on the registry that were already pushed (#22647).argv[0]
that is not a valid command path, as might happen when used inpodmansh
(#22672).podman machine
connection URIs could be incorrect after an SSH port conflict, rendering machines inaccessible.podman events
command would not print an error if incorrect values were passed to its--since
and--until
options.host.containers.internal
entry could be added when running rootless containers using thebridge
network mode (#22653).API
Misc
podman machine
on Darwin systems when--log-level=debug
is used.EXTRA_BUILD_TAGS
environment variable.v5.0.3
Compare Source
Security
Bugfixes
podman machine start
would fail if the machine had a volume with a long target path (#22226).podman machine start
mounted volumes with paths that included dashes in the wrong location (#22505).Misc
v5.0.2
Compare Source
Bugfixes
:z
or:Z
volume mount options on a directory with read only files (#19852)API
v5.0.1
Compare Source
Bugfixes
podman machine
VMs required an SSH client be installed on the system (#22075).podman build
command from working properly when connecting from a rootless client to a rootful server (#22109).Misc
podman machine
now fails immediately if admin privileges are not available (previously, it would only fail when it reached operations that required admin privileges).v5.0.0
Compare Source
5.0.0
Security
podman build
which allowed a user to write files to the/
directory of the host machine if selinux was not enabled.Features
podman machine
can now use the native Apple hypervisor (applehv
) when run on MacOS.podman machine reset
, which will remove all existingpodman machine
VMs and relevant configurations.podman manifest add
command now supports a new--artifact
option to add OCI artifacts to a manifest list.podman create
,podman run
, andpodman push
commands now support the--retry
and--retry-delay
options to configure retries for pushing and pulling images.podman run
andpodman exec
commands now support a new option,--preserve-fd
, which allows passing a list of file descriptors into the container (as an alternative to--preserve-fds
, which passes a specific number of file descriptors).podman kube play
command can now create image-based volumes using thevolume.podman.io/image
annotation.podman kube play
can now include volumes from other containers (similar to the--volumes-from
option) using a new annotation,io.podman.annotations.volumes-from
(#16819).podman kube play
can now set user namespace options through the theio.podman.annotations.userns
annotation in the pod definition (#20658).containers.conf
fieldinterface_name
(#21313).--gpus
option topodman create
andpodman run
is now compatible with Nvidia GPUs (#21156).--mount
option topodman create
andpodman run
supports a new mount option,no-dereference
, to mount a symlink (instead of its dereferenced target) into a container (#20098).--config
, to point to a Docker configuration where we can source registry login credentials.podman ps --format
command now supports a new format specifier,.Label
(#20957).uidmapping
andgidmapping
options to thepodman run --userns=auto
option can now map to host IDs by prefixing host IDs with the@
symbol..pod
unit files (#17687).Entrypoint
andStopTimeout
, in.container
files (#20585 and #21134).Ulimit
key multiple times in.container
files to set more than one ulimit on a container.Notify
key tohealthy
in.container
files, to only sdnotify that a container has started when its health check begins passing (#18189).Breaking Changes
podman machine
commands has seen extensive rewrites. Configuration files have changed format and VMs from Podman 4.x and earlier are no longer usable.podman machine
VMs must be recreated with Podman 5.podman machine init
command now pulls images as OCI artifacts, instead of using HTTP. As a result, a validpolicy.json
file is required on the host. Windows and Mac installers have been changed to install this file.podman machine
on Mac. Instead, the native Apple hypervisor is supported.ConfigPath
andImage
fields are no longer provided by thepodman machine inspect
command. Users can also no longer use{{ .ConfigPath }}
or{{ .Image }}
as arguments topodman machine inspect --format
.podman inspect
for containers has seen a number of breaking changes to improve Docker compatibility, including changingEntrypoint
from a string to an array of strings and StopSignal from an int to a string.podman inspect
command for containers now returns nil for healthchecks when inspecting containers without healthchecks.podman pod inspect
command now outputs a JSON array regardless of the number of pods inspected (previously, inspecting a single pod would omit the array).PODMAN_IGNORE_CGROUPSV1_WARNING
environment variable can be set to suppress warnings.slirp4netns
topasta
for improved performance. As a result, networks namedpasta
are no longer supported.--image
option replaces the now deprecated--image-path
option forpodman machine init
.podman events --format "{{json .}}"
has been changed to improve Docker compatibility, including thetime
andtimeNano
fields (#14993).podman machine
VMs and the username used within the VM are now validated and must match this regex:[a-zA-Z0-9][a-zA-Z0-9_.-]*
.--annotation
topodman manifest annotate
andpodman manifest add
, the--configmap
,--log-opt
, and--annotation
options topodman kube play
, the--pubkeysfile
option topodman image trust set
, the--encryption-key
and--decryption-key
options topodman create
,podman run
,podman push
andpodman pull
, the--env-file
option topodman exec
, the--bkio-weight-device
,--device-read-bps
,--device-write-bps
--device-read-iops
,--device-write-iops
,--device
,--label-file
,--chrootdirs
,--log-opt
, and--env-file
options topodman create
andpodman run
, and the--hooks-dir
and--module
global options.Changes
podman system reset
command no longer waits for running containers to gracefully stop, and instead immediately sends SIGKILL (#21874).podman network inspect
command now includes running containers using the network in its output (#14126).podman compose
command is now supported on non-AMD64/ARM64 architectures.podman machine
will now pass HTTP proxy environment variables into the VM for all providers.--no-trunc
option to thepodman kube play
andpodman kube generate
commands has been deprecated. Podman now complies to the Kubernetes specification for annotation size, removing the need for this option.DOCKER_HOST
environment variable will be set by default for rootless users when podman-docker is installed.podman system connection
and farms frompodman farm
are now written to a new configuration file calledpodman-connections.conf
. As a result, Podman no longer writes tocontainers.conf
. Existing connections fromcontainers.conf
will still be respected.podman farm
subcommands (save forpodman farm build
) no longer need to connect to the machines in the farm to run.podman create
andpodman run
commands no longer require specifying an entrypoint on the command line when the container image does not define one. In this case, an empty command will be passed to the OCI runtime, and the resulting behavior is runtime-specific.podman machine
VMs on Mac is nowsystem_u:object_r:nfs_t:s0
so that it can be shared with all containers without issue.podman machine
will now share a single SSH key key for access. As a result,podman machine rm --save-keys
is deprecated as the key will persist by default.Bugfixes
podman stats
command would not show network statistics when thepasta
network mode was used.podman machine
VMs using the HyperV provider could not mount shares on directories that did not yet exist.podman compose
command did not respect the--connection
and--url
options.podman stop -t -1
command would wait for 0 seconds, not infinite seconds, before sending SIGKILL (#21811).slirp4netns
network mode was used with a restart policy ofalways
orunless-stopped
oron-failure
and a user namespace (#21477).docker.sock
symlink (#20650).podman image scp
command could fail if there was not sufficient space in the destination machine's/tmp
for the image (#21239).podman inspect
(#13102).podman kube play
did not create memory-backed emptyDir volumes using a tmpfs filesystem.--rm
were sometimes not removed after a reboot (#21482).podman events
command using the remote Podman client did not display the network name associated with network events (#21311).podman farm build
did not properly handle the--tls-verify
option and would override server defaults even if the option was not set by the user (#21352).podman inspect
command could segfault on FreeBSD (#21117)..container
file with certain types of trailing whitespace (#21109).bind-mount-options
key (#21080)..container
files (#20992).--publish-all
option topodman kube play
did not function when used with the remote Podman client.podman kube play --build
command could not build images whose Dockerfile specified an image from a private registry with a self-signed certificate in aFROM
directive (#20890).API
/libpod/images/$name/resolve
, has been added to resolve a (potential) short name to a list of fully-qualified image references Podman which could be used to pull the image./etc/hosts
were copied into create containers, resulting in incompatibility with network aliases.Misc
podman build
.v4.9.5
Compare Source
Security
API
v4.9.4
Compare Source
Security
podman build
which allowed a user to write files to the/
directory of the host machine if selinux was not enabled.Bugfixes
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.