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

gosu binary Vuln with thirdparty github.com/opencontainers/runc (CVE-2023-27561) #130

Closed
eshafaq1 opened this issue Aug 8, 2023 · 12 comments · Fixed by #134
Closed

gosu binary Vuln with thirdparty github.com/opencontainers/runc (CVE-2023-27561) #130

eshafaq1 opened this issue Aug 8, 2023 · 12 comments · Fixed by #134

Comments

@eshafaq1
Copy link

eshafaq1 commented Aug 8, 2023

There looks to be a vulnerability with a third party package (github.com/opencontainers/runc) in the latest version of gosu. (see screenshot)

image

This also mentioned as part of a regression here:
opencontainers/runc#2197 (comment)

Filing this ticket in hopes folks can get gosu patched.

@tianon
Copy link
Owner

tianon commented Aug 8, 2023

@eshafaq1
Copy link
Author

eshafaq1 commented Aug 9, 2023

@tianon
Copy link
Owner

tianon commented Aug 9, 2023

I get the feeling you didn't read the link 🤔 can you share the source of your binary and the exact command and output of your govulncheck invocation?

@eshafaq1
Copy link
Author

@tianon I did read the link you supplied and scanned the gosu binary present in the mongo:6.0.8 container, but the only vulnerability is that is present is in your exceptions list is GO-2023-1840

4d764a2d38e3 mongo:6.0.8
docker cp 4d764a2d38e3:/usr/local/bin/gosu /tmp/
govulncheck -mode=binary /tmp/gosu
GO-2023-1840

I believe this is still a valid vulnerability and from the referenced links be been reintroduced due to a regression for a fix to this CVE. and I don't think it's recorded in the Go Vuln DB yet.

Fix and reference to original CVE in this ticket - opencontainers/runc#3751

@tianon
Copy link
Owner

tianon commented Aug 10, 2023

The gosu tool does not create any mounts, though, so I'm a little confused how that vulnerability could apply (in other words, govulncheck is successfully detecting that we do not use any of the affected functionality).

@tianon
Copy link
Owner

tianon commented Aug 10, 2023

See also https://github.com/search?q=repo%3Agolang%2Fvulndb%20GO-2022-0274&type=code (this vulnerability is definitely in the database)

@eshafaq1
Copy link
Author

eshafaq1 commented Aug 10, 2023

The actual vulnerability is with the runc lib (v1.1.0) used by gosu.

I noticed you have some info in the readme about runc vulns

If you believe you have found a new vulnerability in gosu, chances are very high that it's actually a vulnerability in runc (or at the very least, runc's code), and should be reported appropriately and responsibly

They (runc) have captured and resolved this vulnerability in version v1.1.5. -

I don't know much about Go dependancies, but it seems like gosu/go.mod require github.com/opencontainers/runc v1.1.0 ---> needs to be upgraded to v1.1.5

@tianon
Copy link
Owner

tianon commented Aug 10, 2023

The vulnerable code in runc is the code that performs mounts. The gosu tool does not invoke any of that code under any circumstances.

@minakolta
Copy link

Hi @tianon can you please introduce this update suggested by @eshafaq1? I am pretty convinced by your point, on the other hand, if that won't impact the package it's better to upgrade the version as a lot of reported issues are marked on all images that utilize gosu including MongoDB

@tianon
Copy link
Owner

tianon commented Aug 16, 2023

This project does not rebuild/release to "fix" CVEs which do not apply to actual builds of gosu.

@docgurureddy
Copy link

Hi @tianon,

Your latest version on the gosu build on go 1.18.2. Any chance on building new go release like go 1.20.5 or higher?

Thanks!

@tianon
Copy link
Owner

tianon commented Aug 21, 2023

This project does not rebuild/release to "fix" CVEs which do not apply to actual builds of gosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants