Skip to content

Conversation

@cevich
Copy link
Member

@cevich cevich commented Nov 20, 2025

/kind other

What this PR does / why we need it:

Backport PR #6484 & #6511

How to verify it

CI + Manual

Which issue(s) this PR fixes:

Resolves RHEL-126923

Special notes for your reviewer:

The commits in this PR were created with the assistance of AI, backported from #6484 and #6511. When reviewing please pay special attention to the following:

  1. Vendor directory consistency:

    • Vendor directory was completely regenerated using make vendor-in-container after each go.mod change
    • Never manually edited, ensuring consistency with go.mod and go.sum
    • Backport change: Same process as source branches - vendor directory was regenerated after dependency updates to ensure consistency.
  2. All compilation verified:

    • Project compiles successfully with make after every commit
    • All compilation errors encountered during backport were resolved and ammended to the commit.
  3. "Disable lint checking"

    • This check fails on the branch even w/o any changes.
    • In CI the problem is difficult to diagnose as no output is provided,
      rather the process is simply killed.
    • Backport change: This commit was manually created, it does not exist on the
      source PRs.
  4. "Bump runc to v1.2.8 - CVE-2025-52881" - Security update from PR [release-1.39] Bump runc to v1.2.8 - CVE-2025-52881 #6484:

    • Updated runc dependency to v1.2.8 to address CVE-2025-52881, CVE-2025-31133, and CVE-2025-52565
    • Backport change: Updated SELinux API usage in chroot/selinux.go and util.go:
      • Changed from label.SetProcessLabel() to selinux.SetExecLabel() (API change in older release branch)
      • Changed from label.ReserveLabel() returning an error to selinux.ReserveLabel() with no return value (API change in older release branch)
    • Backport change: These API changes were necessary because the release-1.33 branch uses an older version of the selinux library with a different API surface than the main branch
  5. "run: handle relabeling bind mounts ourselves" - From PR [release-1.39] run: handle relabeling bind mounts ourselves, tag 1.39.6 #6511:

    • Added relabel() helper function in run_common.go that wraps label.Relabel() with error handling for ENOTSUP (labeling not supported)
    • Added logic in run_linux.go to handle "z" and "Z" mount flags by relabeling bind mount sources before passing mounts to the runtime
    • Removes relabel flags from mount options passed to runtime since relabeling is now handled internally
    • Backport change: The relabel() helper function includes ENOTSUP error handling that gracefully degrades when SELinux labeling is not supported, which is important for compatibility across different system configurations
  6. "Skip bud with --cpu-shares test on runc/cgroupsv2" - Backport-specific test adjustment:

    • Added test skip condition for bud with --cpu-shares test when using runc with cgroupsv2
    • Backport change: A bug exists in runc 1.2.8 (and potentially other versions) that causes incorrect CPU shares calculation with cgroupsv2. Rather than checking against the miscalculated value, the test is skipped to avoid false failures.
  7. "Prune CI tests for RHEL release branch" - Backport-specific CI optimization:

    • Significantly reduced CI test matrix in .cirrus.yml (removed 99 lines, added 7)
    • Backport change: This branch is used as the source for RHEL releases, so many CI tests that are relevant for main branch development are not necessary here.
  8. "vendor: switch to moby/sys/capability" - Dependency update from PR [release-1.39] run: handle relabeling bind mounts ourselves, tag 1.39.6 #6511:

    • Switched from github.com/syndtr/gocapability to github.com/moby/sys/capability (a maintained fork)
    • Updated all capability-related code to use the new package
    • Backport change: No functional changes from the original PR
  9. "Don't set ambient capabilities" - Capability handling fix from PR [release-1.39] run: handle relabeling bind mounts ourselves, tag 1.39.6 #6511:

    • Removed setting of ambient capabilities since they can't be raised without inheritable ones
    • Amends previous commit that incorrectly set ambient capabilities
    • Backport change: No functional changes from the original PR
  10. "Fix linter errors"

    • Each fix performed by the Clanker (AI)
    • Each fix reviewed by me and deemed "who cares, but if it makes the linter happy 🤷"
  11. "Bump Buildah to v1.33.13" - Version and changelog updates:

    • Content manually generated using buildah_release 1.33.13 script.

Does this PR introduce a user-facing change?

None

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 20, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cevich
Once this PR has been reviewed and has the lgtm label, please assign giuseppe for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@packit-as-a-service
Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

@cevich cevich marked this pull request as draft November 20, 2025 15:44
@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch 4 times, most recently from 6136c9c to 29d79a3 Compare November 20, 2025 17:03
@Luap99
Copy link
Member

Luap99 commented Nov 20, 2025

@cevich Are the RHEL build envs now updated with newer go versions?

Last time I tried to bump go versions on these old branches that didn't go so well, ref containers/podman@f8bca0f and containers/podman@03b53d3

@TomSweeneyRedHat
Copy link
Member

@Luap99 For RHEL 8, yes there are new go versions there, and RHEL 9 is in progress.

@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch 2 times, most recently from 2e82a1b to 31fde51 Compare November 20, 2025 18:51
@cevich
Copy link
Member Author

cevich commented Nov 20, 2025

As of 31fde51 the tests are updating to runc-1.33 before running. This seems to have triggered a bunch of warnings the tests don't know how to deal with:

'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_AUDIT_WRITE: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_CHOWN: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_DAC_OVERRIDE: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_FOWNER: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_FSETID: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_KILL: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_MKNOD: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_NET_BIND_SERVICE: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_NET_RAW: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SETFCAP: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SETGID: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SETPCAP: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SETUID: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SYS_CHROOT: operation not permitted"'

Anyone have any idea what those mean, if they're bad, and/or how to suppress them or should I just force the tests to ignore them?

@nalind
Copy link
Member

nalind commented Nov 20, 2025

As of 31fde51 the tests are updating to runc-1.33 before running. This seems to have triggered a bunch of warnings the tests don't know how to deal with:

'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_AUDIT_WRITE: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_CHOWN: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_DAC_OVERRIDE: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_FOWNER: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_FSETID: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_KILL: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_MKNOD: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_NET_BIND_SERVICE: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_NET_RAW: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SETFCAP: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SETGID: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SETPCAP: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SETUID: operation not permitted"'
'time="2025-11-20T13:14:39-06:00" level=warning msg="can't raise ambient capability CAP_SYS_CHROOT: operation not permitted"'

Anyone have any idea what those mean, if they're bad, and/or how to suppress them or should I just force the tests to ignore them?

These were fixed by commit 95f2e10 from #5754.

TomSweeneyRedHat added a commit to TomSweeneyRedHat/buildah that referenced this pull request Nov 21, 2025
Stealing from @cevich's work in containers#6520.
In CI, the project and tests are compiled, so therefore require newer
CI/VM images with support for the newer golang requirements.

Signed-off-by: tomsweeneyredhat <[email protected]>
TomSweeneyRedHat added a commit to TomSweeneyRedHat/buildah that referenced this pull request Nov 21, 2025
Add GoProxy.  Stolen from @cevich's containers#6520

Signed-off-by: tomsweeneyredhat <[email protected]>
@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch 2 times, most recently from 97796dc to 9ca5d57 Compare November 24, 2025 15:08
@cevich
Copy link
Member Author

cevich commented Nov 24, 2025

I believe the git-repo errors can be fixed by backporting 5abf038. All the "filesystem-specific options" errors I have no clue about, any help would be appreciated:

[+1747s] # error running container: from /usr/bin/runc creating container for
[/bin/sh -c cat /tmp/hey]: time="2025-11-24T10:40:14-06:00" level=error msg="runc
create failed: invalid mount &{Source:/var/tmp/buildah2940546746/mnt/buildah-bind-target-3 
Destination:/tmp Device:bind Flags:20481 ClearedFlags:0 PropagationFlags:[262144]
Data:z Relabel: RecAttr:<nil> Extensions:0 IDMapping:<nil>}:
bind mounts cannot have any filesystem-specific options applied"

@cevich
Copy link
Member Author

cevich commented Nov 24, 2025

Poking around, I think the bind mounts cannot have any filesystem-specific options applied errors were one of the things fixed by #6511 which I had original started to backport but then gave up when I saw Tom's PR didn't include them. Now I think they're necessary, so trying to backport them again...

@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch from d14e856 to 5eb14d5 Compare November 24, 2025 20:21
@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch from 5eb14d5 to 2904337 Compare November 25, 2025 14:51
@cevich
Copy link
Member Author

cevich commented Nov 25, 2025

I dunno what the "validate/commit" check is that's failing, nor how to re-run it (logs make it appear to be a flake?) but all the Cirrus tests are now green. I'm exhausted from looking at this and need to take a break. But perhaps could an initial review pass be made at this point?

@cevich cevich marked this pull request as ready for review November 25, 2025 16:36
nalind and others added 13 commits December 5, 2025 12:02
Use a listener helper to bind to an available-according-to-the-kernel
listening port and run a command with its stdio more or less tied to the
connection instead of trying to launch a git daemon directly using a
port number that we can only guess is available.

Signed-off-by: Nalin Dahyabhai <[email protected]>

Signed-off-by: Chris Evich <[email protected]>
Assisted-by: Claude (Anthropic)
Handle requested relabeling of bind mounts (i.e., the "z" and "Z" flags)
directly, instead of letting the runtime handle the relabeling.

Signed-off-by: Nalin Dahyabhai <[email protected]>

Signed-off-by: Chris Evich <[email protected]>
Assisted-by: Claude (Anthropic)
Signed-off-by: Nalin Dahyabhai <[email protected]>

Signed-off-by: Chris Evich <[email protected]>
Assisted-by: Claude (Anthropic)
Use the named constants for the status values that runtimes can report
to us when we run them with the "state" command.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Tweak the wording that describes the effects of --cgroup-parent to be
clear that it only affects handling of RUN instructions.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Run integration tests (both as root and rootless) with both crun and
runc on Fedora, to help ensure that we can use either.

Signed-off-by: Nalin Dahyabhai <[email protected]>

Signed-off-by: Chris Evich <[email protected]>
Assisted-by: Claude (Anthropic)
This branch is only used as the source for RHEL releases, prune CI tests
that are irrelevant for this purpose.

Signed-off-by: Chris Evich <[email protected]>
A bug is present in some versions of runc (including 1.2.8) which result
in the wrong number of CPU shares being used.  Since the runc version
may change in a future commit, but still contain the bug, simply skip
the test rather than checking against the miscalculated value.

Signed-off-by: Chris Evich <[email protected]>
Assisted-by: Claude (Anthropic)
Update the versions of ginkgo that we build for use by our e2e tests,
and the linter.

Signed-off-by: Nalin Dahyabhai <[email protected]>

Signed-off-by: Chris Evich <[email protected]>
The version of containers/common we're currently using on this branch included a
bug which was later fixed by containers/common#2199.
If we get an update on its v0.57 branch which includes that fix, we can
drop this patch from this branch, but until then, work around the part
that breaks our tests.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Newer docker build doesn't set it, so we need to stop.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Make setting the Parent field in the config blob of a docker format
image optional (yes, we're bringing it back!), since it no longer
appears to be set by newer versions of docker build.

Signed-off-by: Nalin Dahyabhai <[email protected]>
If the working directory ends with the path separator, and trimming it
wouldn't produce an empty value, trim it, for conformance.

This was originally fixed in imagebuilder, and we picked up the change
automatically, but this should provide the same end-result.

Signed-off-by: Nalin Dahyabhai <[email protected]>
@cevich
Copy link
Member Author

cevich commented Dec 5, 2025

Note to me: CI first green at this commit.

@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch from 2904337 to 137ef50 Compare December 5, 2025 18:02
Signed-off-by: Chris Evich <[email protected]>
Assisted-by: Claude (Anthropic)
@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch from 137ef50 to 7087c91 Compare December 5, 2025 19:05
@cevich cevich marked this pull request as ready for review December 5, 2025 19:44
@cevich
Copy link
Member Author

cevich commented Dec 5, 2025

I may be jumping the gun a bit, since CI is still running 🤞 But it's past the vendoring/Smoke tests so I'm hopeful that after hauling in the commits from #6571 this should be ready for another look @nalind (please and thank you).

@TomSweeneyRedHat
Copy link
Member

@cevich it looks like one of your commit descriptions is over 72 characters. The two longest that I can spot here both appear to be 71. Unfortunately, I can't do a rebase on your commits to see if I missed one. Everything else seems happy here though!

@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch from 7087c91 to 8438775 Compare December 8, 2025 14:07
@cevich
Copy link
Member Author

cevich commented Dec 8, 2025

Force-push: Gave haircuts to a few commit titles. No code changes.

@Luap99
Copy link
Member

Luap99 commented Dec 8, 2025

The validate task is non blocking, you can just ignore it on backports I would say.

@cevich
Copy link
Member Author

cevich commented Dec 8, 2025

As per @Luap99 comment, going back to 7087c91 since having the commit message names match across all my backport PRs seems like a useful thing.

@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch from 8438775 to 7087c91 Compare December 8, 2025 16:52
@cevich
Copy link
Member Author

cevich commented Dec 8, 2025

Aww darn, was hoping it would re-use the previous CI results 😞

Signed-off-by: Chris Evich <[email protected]>
@cevich cevich force-pushed the release-1.33_cve_3113-52565-52881 branch from 7087c91 to 5bf7313 Compare December 8, 2025 16:56
@cevich
Copy link
Member Author

cevich commented Dec 8, 2025

force-push: Since CI has to run again, updated the release commit as it was missing some (minor) content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants