Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.27] Properly validate cache IDs and sources #5797

Merged

Conversation

dashea
Copy link

@dashea dashea commented Oct 24, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Backport fix for CVE-2024-9675 to release-1.27 branch

How to verify it

Test included in PR

Which issue(s) this PR fixes:

https://issues.redhat.com/browse/RHEL-62385
https://issues.redhat.com/browse/RHEL-62376

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

mheon and others added 2 commits October 24, 2024 15:04
The `--mount type=cache` argument to the `RUN` instruction in
Dockerfiles was using `filepath.Join` on user input, allowing
crafted paths to be used to gain access to paths on the host,
when the command should normally be limited only to Buildah;s own
cache and context directories. Switch to `filepath.SecureJoin` to
resolve the issue.

Fixes CVE-2024-9675

N/B: The system test was slightly modified from the original
fix done by Matt.  The older CI environments used by this
release successfully block the escape with SELinux.

Signed-off-by: Matt Heon <[email protected]>
Signed-off-by: David Shea <[email protected]>
Signed-off-by: Chris Evich <[email protected]>
@dashea
Copy link
Author

dashea commented Oct 24, 2024

Sorry for spreading these out this is the last one.

@nalind
Copy link
Member

nalind commented Oct 24, 2024

/approve
/lgtm

Copy link
Contributor

openshift-ci bot commented Oct 24, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dashea, nalind

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

The pull request process is described 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

@nalind
Copy link
Member

nalind commented Oct 24, 2024

/override "Total Success"

Copy link
Contributor

openshift-ci bot commented Oct 24, 2024

@nalind: Overrode contexts on behalf of nalind: Total Success

In response to this:

/override "Total Success"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit a64c647 into containers:release-1.27 Oct 24, 2024
4 checks passed
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.

3 participants