Commit graph

24496 commits

Author SHA1 Message Date
Lokesh Mandvekar
52090f8212
Merge pull request #28533 from TomSweeneyRedHat/dev/tsweeney/v5.4-rhel-cve-2026-34986
[v5.4-rhel] Bump Go Jose v4.1.4, CVE-2026-34986
2026-04-27 08:11:54 -04:00
Tom Sweeney
4852b4bb97 [v5.4-rhel] Bump Go Jose v4.1.4, CVE-2026-34986
Bump github.com/go-jose/go-jose/v4 to v4.1.4 to address CVE-2026-34986

Fixes: https://redhat.atlassian.net/browse/RHEL-164989,
https://redhat.atlassian.net/browse/RHEL-164969, https://redhat.atlassian.net/browse/OCPBUGS-81810

Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
2026-04-16 19:58:28 -04:00
Paul Holzinger
3e69b5fadc
Merge pull request #28199 from TomSweeneyRedHat/dev/tsweeney/accel-596-v5.4-rhel-2
[v5.4-rhel] Fix: Remove appending rw as the default mount option
2026-03-06 13:50:55 +01:00
rcmadhankumar
6f775c9091 [v5.4-rhel] Fix: Remove appending rw as the default mount option
The backstory for this is that runc 1.2 (opencontainers/runc#3967)
fixed a long-standing bug in our mount flag handling (a bug that crun
still has). Before runc 1.2, when dealing with locked mount flags that
user namespaced containers cannot clear, trying to explicitly clearing
locked flags (like rw clearing MS_RDONLY) would silently ignore the rw
flag in most cases and would result in a read-only mount. This is
obviously not what the user expects.

What runc 1.2 did is that it made it so that passing clearing flags
like rw would always result in an attempt to clear the flag (which was
not the case before), and would (in all cases) explicitly return an
error if we try to clear locking flags. (This also let us finally fix a
bunch of other long-standing issues with locked mount flags causing
seemingly spurious errors).

The problem is that podman sets rw on all mounts by default (even if
the user doesn't specify anything). This is actually a no-op in
runc 1.1 and crun because of a bug in how clearing flags were handled
(rw is the absence of MS_RDONLY but until runc 1.2 we didn't correctly
track clearing flags like that, meaning that rw would literally be
handled as if it were not set at all by users) but in runc 1.2 leads to
unfortunate breakages and a subtle change in behaviour (before, a ro
mount being bind-mounted into a container would also be ro -- though
due to the above bug even setting rw explicitly would result in ro in
most cases -- but with runc 1.2 the mount will always be rw even if
the user didn't explicitly request it which most users would find
surprising). By the way, this "always set rw" behaviour is a departure
from Docker and it is not necesssary.

Fixes: https://issues.redhat.com/browse/RHEL-152635,
https://issues.redhat.com/browse/RHEL-152631

Signed-off-by: rcmadhankumar <madhankumar.chellamuthu@suse.com>
(cherry picked from commit bf7dcd5619)
Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
2026-03-05 16:29:45 -05:00
Matt Heon
8cf4527bbf
Merge pull request #28204 from timcoding1988/backport-aws-oidc-v5.4-rhel
BackPort for (aws migrate to oidc)
2026-03-05 12:13:20 -05:00
Tim Zhou
e60b8de03f migrate to oidc
Signed-off-by: Tim Zhou <tizhou@redhat.com>
2026-03-05 11:28:14 -05:00
Paul Holzinger
90f488fa1b
Merge pull request #27934 from TomSweeneyRedHat/dev/tsweeney/AF599-rhel-5.4-2
[v5.4-rhel] podman rm: handle case where conmon was killed
2026-01-22 20:36:23 +01:00
Paul Holzinger
1f03c86dac [v5.4-rhel] podman rm: handle case where conmon was killed
Adding this commit from #26643 to v5.4-rhel as after PR #27910
failed QE testing.  The error `ErrConmonDead` was added sometime
after Podman v5.4-rhel and before v5.6-rhel was released.
New tests for the issue in #27910 are failing here in 5.4-rhel
due to that renamed error.

This will hopefully finally

Fixes: https://issues.redhat.com/browse/RHEL-141490

Original PR text for this change from @Luap99

When conmon was killed podman rm -f currently fails but running it again
then works which doesn't really makes sense. We should properly remove
the contianer even if conmon is dead.

In fact the code already handles ErrConmonDead as stop error when we
remove the container but this error was never thrown anywhere. To fix
this throw ErrConmonDead instead of ErrInternal because that is not an
intenral error if something else killed conmon.

With this we can correctly cleanup and remove the container. The fact
that this works on the first try is important for quadlet units as they
only run the ExecStopPost= command once to remove it.

Fixes: #26640

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2026-01-22 14:10:39 -05:00
Paul Holzinger
f04ada37b4 [v5.4-rhel] podman inspect: fix error difference between local...
and remote

There is no reason for local and rmeote to use a different error that
just differs in quoting. Make them consitent to simplify the tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2026-01-22 14:10:39 -05:00
Ashley Cui
54f6b370d4
Merge pull request #27910 from TomSweeneyRedHat/dev/tsweeney/AF599-rhel-5.4
[v5.4-rhel] podman system migrate fixes when pause process and conmon got killed
2026-01-16 10:58:21 -05:00
Paul Holzinger
f56ddf04e6 [v5.4-rhel] rootless_linux.c: use shortcut for system commands
There doesn't seem any reason why the system commands should not join
the userns. In particular the main commands use ParentNSRequired and
UnshareNSRequired when they don't want to be joined to the main userns.
Since the system command don't set these the go code does the join and
re-exec anyway so might as well use the shortcut to speed that up.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2026-01-15 15:42:17 -05:00
Paul Holzinger
5784651f7a [v5.4-rhel] SetupRootless handle case where conmon pid are not valid
When trying to join the conmon pid to recreate the pause process based
on the namespace it can be that the pid is no longer valid, i.e. when
conmon crashed or was killed.

Currently we have a big issue that can be reproduced using:
$ podman run -d quay.io/libpod/testimage:20241011 sleep 100
$ killall -9 conmon
$ killall catatonit

All commands would fail as we keep trying to rejoin the namespace of the
non existing conmon process.

So to address that fall back to creating a new namespace if we fail to
join the conmon pids.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2026-01-15 15:25:38 -05:00
Paul Holzinger
166a9f2468 [v5.4-rhel] preallocate paths in SetupRootless
Just a minor improvement as we know the size needed for the slice we can
allocate it only once instead of the append having to resize it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2026-01-15 15:23:38 -05:00
Paul Holzinger
29205bb83a [v5.4-rhel] fix noMoveProcess in SetupRootless
Based on the description in commit 63ef557 this was added so that the
migrate command does not move the pause process into a separate cgroup.

It should however not disable the rejoining of the userns when the pause
process join failed. BEcause of this we end up calling migrate without a
userns and that then can fail if there are actual contianer it tries to
cleanup.

Fixes: 63ef5576ed ("command: migrate doesn't move process to cgroup")

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2026-01-15 15:22:57 -05:00
Paul Holzinger
44ba9e4509 [v5.4-rhel] use return error handling in SetupRootless
There is no good reason to use logrus and os.Exit() here, other parts of
this function already return the error so do the same. The main podman
process will exit then with the normal formatted error message.

And also log an error about the last return which should never happen as
we should have exited above if the re-exec worked or errored out.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2026-01-15 15:22:16 -05:00
Paul Holzinger
545281911e
Merge pull request #27809 from TomSweeneyRedHat/dev/tsweeney/podmanreg_v5.4-rhel
[v5.4-rhel] do not pass volume options as bind mounts options to runtime
2026-01-06 15:25:03 +01:00
Paul Holzinger
3c5f6976fb [v5.4-rhel] do not pass [no]copy as bind mounts options to runtime
Starting with runc 1.3.0 it errors when we pass unknown mount options to
the runtime, the copy/nocopy options are specific to podman when we
mount the volume and are not valid mount options for the runtime.

Fixes: #26938

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-12-19 14:22:43 -05:00
Paul Holzinger
d540828500 [v5.4-rhel] do not pass volume-opt as bind mounts options to runtime
Starting with runc 1.3.0 it errors when we pass unknown mount options to
the runtime, the volume-opt options are specifc to the volume we create
and should not be passed to the mount in the oci spec.

Fixes: #26938

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-12-19 14:22:06 -05:00
Lokesh Mandvekar
591e60cf24
Merge pull request #27806 from TomSweeneyRedHat/dev/tsweeney/runc-1.2.9-v5.4-rhel
[v5.4-rhel] Bump runc to 1.2.9, Buildah to v1.39.7
2025-12-19 10:07:44 -05:00
tomsweeneyredhat
b12d7563f8 [v5.4-rhel] Bump runc to 1.2.9, Buildah to v1.39.7
Bump runc to v1.2.9 and Buildah to v1.39.7.  This fixes a number of
regressions that happened with the fix for CVE-2025-52881 within
the runc project.

Fixes: https://issues.redhat.com/browse/RHEL-132829,
https://issues.redhat.com/browse/RHEL-132824,
https://issues.redhat.com/browse/OCPBUGS-66305, https://issues.redhat.com/browse/OCPBUGS-66306

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-12-18 16:51:49 -05:00
Paul Holzinger
7d8a6ba172
Merge pull request #27704 from TomSweeneyRedHat/dev/tsweeney/cve-2025-47913-v5.4-rhel
[v5.4-rhel] CVE-2025-47913 x/crypto
2025-12-11 12:08:54 +01:00
Paul Holzinger
33c2df04bb [v5.4-rhel] go1.23: use std maps package
With go 1.23 the maps package was added in the std library. The linter
now wants us to use that. However the API chnaged as it returns an
iterator, thus we also have to use slices.Collect().

Also update the Fedora IMAGE_SUFFIX value in .cirrus.yml

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-12-10 19:51:12 -05:00
tomsweeneyredhat
77d6859d8a [v5.4-rhel] CVE-2025-47913 x/crypto
Bump golang.org/x/cyrpto to v0.43.0 to solve
CVE-2025-47913

Fixes: https://issues.redhat.com/browse/OCPBUGS-66017

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-12-10 16:43:34 -05:00
openshift-merge-bot[bot]
48ff344362
Merge pull request #27526 from TomSweeneyRedHat/dev/tsweeney/cve-2025-52881-v5.4-rhel-1
[v5.4-rhel] Bump runc to v1.2.8 - CVE-2025-52881
2025-11-18 10:38:55 +00:00
tomsweeneyredhat
3227947c7a [v5.4-rhel] Bump runc to v1.2.8, Buildah v1.39.5
Bump runc to v1.2.8 and Buildah to v1.39.5 to fix
CVE-2025-52881.  Also addresses CVE-2025-31133 and CVE-2025-52565

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-11-17 15:05:54 -05:00
tomsweeneyredhat
1da7b914a4 [v5.4-rhel] Vendor selinux v1.13.1 and make adjustments for selinux changes
The location of some functions have changed in the
updated selinux that we are now using in v5.4-rhel.

Make adjustments to calls to acount for that.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-11-17 15:05:10 -05:00
Tim Zhou
d4e4094e3d [v5.4-rhel] rotate aws meta_task keys
Ding the aws meta task keys.

Signed-off-by: Tim Zhou <tizhou@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-11-13 16:15:40 -05:00
Tim Zhou
55aa4d60ea [v5.4-rhel] rotate aws key
Rotate the aws keys.

Signed-off-by: Tim Zhou <tizhou@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-11-13 16:11:05 -05:00
openshift-merge-bot[bot]
7eb05c8505
Merge pull request #27403 from TomSweeneyRedHat/dev/tsweeney/accel-535-v5.4-rhel
[v5.4-rhel] compat API: respect base_hosts_file containers.conf option
2025-10-29 23:01:17 +00:00
Paul Holzinger
38c6108dd1 compat API: respect base_hosts_file containers.conf option
Hard coding to none without checking containers.conf is not a good idea
as users who liked the previous behavior and the podman default behavior
of keeping the hosts entries can no longer do that.

With this commit they can set base_hosts_file = "/etc/hosts" to restore
the previous behavior.

Originally Fixes: https://issues.redhat.com/browse/RHEL-92995

This cherry-pick Fixes: https://issues.redhat.com/browse/ACCELFIX-535

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-10-29 15:20:45 -04:00
openshift-merge-bot[bot]
b0d88c7ec2
Merge pull request #27021 from TomSweeneyRedHat/dev/tsweeney/CVE-2025-9566-v5.4-rhel
[v5.4-rhel] Backport CVE-2025-9566 fixes
2025-09-09 10:09:54 +00:00
Paul Holzinger
89b55ab34d [v5.4-rhel] test/e2e: add CVE-2025-9566 regression test
Ensure we do not regress again.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-09-08 18:06:16 -04:00
Paul Holzinger
2ef1cd7f7e [v5.4-rhel] kube play: don't follow volume symlinks onto the host
For ConfigMap and Secret kube play volumes podman populates the data
from the yaml. However the volume content is not controlled by us and we
can be tricked following a symlink to a file on the host instead.

Fixes: CVE-2025-9566

Fixes: https://issues.redhat.com/browse/RHEL-113141,
https://issues.redhat.com/browse/RHEL-113152,
https://issues.redhat.com/browse/OCPBUGS-61268,
https://issues.redhat.com/browse/OCPBUGS-61270

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-09-08 18:05:00 -04:00
Paul Holzinger
981129454d
Merge commit from fork
[v5.4-rhel] machine init: fix tls check
2025-06-24 15:49:06 +02:00
openshift-merge-bot[bot]
3858d6820d
Merge pull request #26495 from TomSweeneyRedHat/dev/tsweeney/systemcheck_v5.4-rhel
[v5.4-rhel] Skip layer digests for podman system check --quick
2025-06-24 12:57:03 +00:00
Sonny Sasaka
0dd14244da [v5.4-rhel] Skip layer digests for podman system check --quick
podman system check --quick currently only skips layer contents, but
practically it's not much quicker than without the flag.

This changes the flag to also skip checking layer digests which speed up
the check significantly.

In some cases, it is useful to opt for a quicker check if we prioritize
detecting and fixing severe corruption and can tolerate minor damage.

The check option is derived from CRI-O's internal repair:
9e4d86d823/internal/lib/container_server.go (L860)

Fixes: https://issues.redhat.com/browse/OCPBUGS-57981

Signed-off-by: Sonny Sasaka <sonnysasaka@gmail.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-06-23 17:57:22 -04:00
Paul Holzinger
686988456d
machine init: fix tls check
Ensure we verify the TLS connection when pulling the OCI image.

Fixes: CVE-2025-6032
Fixes: https://issues.redhat.com/browse/RHEL-96698
Fixes: https://issues.redhat.com/browse/RHEL-96708

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit 726b506acc)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-23 18:01:13 +02:00
openshift-merge-bot[bot]
f944b21387
Merge pull request #26456 from Honny1/dev/jrodak/healthcheck-timeout-termination-v5.4-rhel
[v5.4-rhel] Fix: Ensure HealthCheck exec session terminates on timeout
2025-06-23 14:33:35 +00:00
Jan Rodák
70c161cab1
[v5.4-rhel] Fix: Use SIGKILL instead of SIGTERM when ExecStopContainer timeout is 0
Aligns behavior with documentation stating SIGKILL should be sent immediately if the timeout is zero.

Fixes: https://issues.redhat.com/browse/RHEL-96916
Fixes: https://issues.redhat.com/browse/RHEL-96917

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
(cherry picked from commit 077649f9d0)
2025-06-18 08:43:10 +02:00
Jan Rodák
ce22ca96ef
[v5.4-rhel] Fix: Ensure HealthCheck exec session terminates on timeout
Previously, the HealthCheck exec session would not terminate on timeout, allowing the healthcheck to run indefinitely.

Fixes: https://issues.redhat.com/browse/RHEL-86096
Fixes: https://issues.redhat.com/browse/RHEL-96916
Fixes: https://issues.redhat.com/browse/RHEL-96917

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
(cherry picked from commit 499ea1168b)
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-06-18 08:42:57 +02:00
Jan Rodák
00007bc171
[v5.4-rhel] Run HealthCheck without creating and removing the ExecSession in the database
Fixes: https://issues.redhat.com/browse/RHEL-69970
Fixes: https://issues.redhat.com/browse/RHEL-96916
Fixes: https://issues.redhat.com/browse/RHEL-96917

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
(cherry picked from commit ad9839ac55)
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-06-18 08:42:06 +02:00
openshift-merge-bot[bot]
0ee1d4919a
Merge pull request #25836 from TomSweeneyRedHat/dev/tsweeney/cleantmp
[v5.4-rhel] Remove persist directory when cleaning up Conmon files
2025-04-08 22:03:17 +00:00
Matt Heon
7b53a64c3c [v5.4-rhel] Remove persist directory when cleaning up Conmon files
This seems to have been added as part of the cleanup of our
handling of OOM files, but code was never added to remove it, so
we leaked a single directory with an exit file and OOM file per
container run. Apparently have been doing this for a while - I'd
guess since March of '23 - so I'm surprised more people didn't
notice.

Fixes #25291

Fixes: https://issues.redhat.com/browse/RHEL-86544, https://issues.redhat.com/browse/RHEL-86550

Signed-off-by: Matt Heon <mheon@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-04-08 16:05:21 -04:00
openshift-merge-bot[bot]
a994a04ea0
Merge pull request #25765 from giuseppe/oci-enoent-errors-v5.4-rhel
[v5.4-rhel] support new crun error messages
2025-04-04 15:47:14 +00:00
Giuseppe Scrivano
a7ac20d913
oci: report empty exec path as ENOENT
unify the error codes returned by runc and crun.

Fix the tests to work with both runtimes, as well as the
https://github.com/containers/crun/pull/1672 changes in progress for
crun.

Follow-up for https://github.com/containers/podman/pull/25340

Closes: https://issues.redhat.com/browse/RHEL-85826

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 4695564730)
2025-04-02 15:25:18 +02:00
Giuseppe Scrivano
170d8630f1
test: adapt tests new crun error messages
Needed-by: https://github.com/containers/crun/pull/1672

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit c65bb903b6)
2025-04-02 15:25:06 +02:00
Giuseppe Scrivano
ae4b00cb9d
test: remove duplicate test
"podman run exit ExecErrorCodeCannotInvoke" does the same thing.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 35d2a65e3a)
2025-04-02 15:25:04 +02:00
openshift-merge-bot[bot]
f7bf65c147
Merge pull request #25721 from TomSweeneyRedHat/dev/tsweeney/buildah-1.39.4
[v5.4-rhel] Bump Buildah to v1.39.4
2025-03-28 16:04:38 +00:00
tomsweeneyredhat
7289dee40b [v5.4-rhel] Bump Buildah to v1.39.4
Bump Buildah to v1.39.4.  This will fix a DDIF issue as noted in: https://issues.redhat.com/browse/RHEL-85212 and https://github.com/containers/podman/issues/25593.

This also addresesses an Image Mode issue when tweaking mount variables
as noted in: https://issues.redhat.com/browse/RHEL-79560

Fixes: https://issues.redhat.com/browse/RHEL-85218,
https://issues.redhat.com/browse/RHEL-85219,
https://issues.redhat.com/browse/RHEL-85116,
https://issues.redhat.com/browse/RHEL-85117

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-03-28 11:34:14 -04:00
openshift-merge-bot[bot]
9ad48423b0
Merge pull request #25595 from TomSweeneyRedHat/dev/tsweeney/v5.4-rhel-buildah-1.39.3
[v5.4-rhel] Bump to Buildah v1.39.3
2025-03-17 08:22:39 +00:00