-
Notifications
You must be signed in to change notification settings - Fork 812
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.9] Bump ocicrypt and go-jose CVE-2024-28180 #2293
[release-1.9] Bump ocicrypt and go-jose CVE-2024-28180 #2293
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
- Shouldn’t this also include an update to
gopkg.in/go-jose/go-jose.v2
? - I don’t mind the
ocicrypt
update, but it seems not to be directly related to the vulnerability. (One major effect it does have is updating from go-jose v2 to v3. That might be a good enough reason to include it.) The downside of this is that it rather extends the scope of the update, so I just wanted to double-check that it is intentional.
Feel free to merge as is if all of this is intentional.
At a first glance, the test failure probably requires backporting also #2286 . |
54d6795
to
25f38c5
Compare
I've reworked this. I skipped the ocicrypt bump, and just went with the sigstore bump like we decided upon in the release-1.11 branch #2292 |
|
Bump github.com/go-jose/go-jose to v3.0.0 and github.com/containers/ocicrypt to v1.1.10 Addresses: CVE-2024-28180 https://issues.redhat.com/browse/OCPBUGS-30788 Signed-off-by: tomsweeneyredhat <[email protected]>
25f38c5
to
db0f387
Compare
I've done a cherry pick and repushed. We'll see where that gets it. |
Linux looks good. I think the macOS builds can just be disabled: They don’t matter for the backports. (Alternatively, #1813 , but we would be building with a recent Go, and that’s probably eventually going to break anyway.) |
dbfd64e
to
bf1df09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .cirrus.yml
changes mostly LGTM. All my comments are non-blocking, just suggestions. I'm happy to take a peek @TomSweeneyRedHat you did a fine job 😄
.cirrus.yml
Outdated
####### | ||
# Removed the osx task in the Skopeo release-1.9 branch on May 1, 2024. | ||
# This release going forward is likely to not be delivered to anything | ||
# but RHEL for bug fixes. AS the CI is failing out right, we'll just | ||
# comment it out for now. TODO: Remove at some later time. | ||
####### | ||
#osx_task: | ||
# # Run for regular PRs and those with [CI:BUILD] but not [CI:DOCS] | ||
# only_if: ¬_docs_multiarch >- | ||
# $CIRRUS_CHANGE_TITLE !=~ '.*CI:DOCS.*' && | ||
# $CIRRUS_CRON != 'multiarch' | ||
# depends_on: | ||
# - validate | ||
# macos_instance: | ||
# image: catalina-xcode | ||
# setup_script: | | ||
# # /usr/local/opt/[email protected] will be populated by (brew install [email protected]) below | ||
# export PATH=$GOPATH/bin:/usr/local/opt/[email protected]/bin:$PATH | ||
# brew update | ||
# brew install gpgme [email protected] go-md2man | ||
# go install golang.org/x/lint/golint@latest | ||
# test_script: | | ||
# export PATH=$GOPATH/bin:/usr/local/opt/[email protected]/bin:$PATH | ||
# go version | ||
# go env | ||
# make validate-local test-unit-local bin/skopeo | ||
# sudo make install | ||
# /usr/local/bin/skopeo -v | ||
####### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a big deal, but just a gentle reminder: This is version control, you can simply delete the lines and they will live on in the history 😁
(Though it helps the archaeologists if this is done in a dedicated commit)
.cirrus.yml
Outdated
|
||
cross_task: | ||
alias: cross | ||
only_if: *not_docs_multiarch | ||
# only_if: *not_docs_multiarch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrmm, this jumped out at me. I checked and see it has been removed from main
as well. As above, I'd suggest just deleting the line instead of commenting it out.
.cirrus.yml
Outdated
@@ -241,7 +247,7 @@ success_task: | |||
depends_on: | |||
- validate | |||
- doccheck | |||
- osx | |||
# - osx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you clobber the commented-out task, make sure to remove this line also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was on the fence for the clobber, I'll go do so and will move the yaml change to a new commit.
bf1df09
to
b37db26
Compare
... because the tests are assuming a v2s2 image, but as of Fedora 39, the image uses the OCI format. Signed-off-by: Miloslav Trmač <[email protected]> Signed-off-by: tomsweeneyredhat <[email protected]>
Remove the osx build which was always failing on this branch. As it's an older branch, we won't be pushing out to anything but RHEL, so osx isn't a concern here. Signed-off-by: tomsweeneyredhat <[email protected]>
b37db26
to
6fc5bb8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks Tom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
Merging as is.
@TomSweeneyRedHat just to make sure:
The vulnerability is in JSONWebEncryption.Decrypt
and JSONWebEncryption.DecryptMulti
.
ocicrypt
does actually call DecryptMulti
, and on this brach, it is calling the square
version of the library which remains at unpatched 2.6.0. OTOH the call is in jweKeyWrapper.UnwrapKey
, processing a private key of the invoking user. So there should be no privilege escalation.
I’m comfortable with the technical decision to leave the unfixed square
…2.6.0 around, and invoked; I just want to highlight this, in case that were insufficient.
Thanks Miloslav for the merge and detailed analysis. These multiple versions of go-jose are killing me. I missed the square bit. Let me go poke at that. The squre/go-jose only went up to 2.6.0, so we can't bump that. Let me go see if I can remove that dependency on the square one. If not, we'll leave it as is. |
IIRC a small (not full) bump of ocicrypt could do the trick. (A full bump would go all the way to v3, which is not used on this branch yet.) |
ocicrypt is dragging in the square version, which disappeared in ocicrypt v1.1.8. However, that's when ocicrypt started pulling in go-jose:v3, and there are a lot of files that are added. Decisions, decisions. |
So there isn’t an intermediate version of ocicrypt, I’m sorry.
I am fine with either decision. |
Bump github.com/go-jose/go-jose to v3.0.0 and
github.com/containers/ocicrypt to v1.1.10
Addresses: CVE-2024-28180
https://issues.redhat.com/browse/OCPBUGS-30788