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

CVEs that do not apply to gosu #104

Closed
tianon opened this issue Mar 9, 2022 · 25 comments
Closed

CVEs that do not apply to gosu #104

tianon opened this issue Mar 9, 2022 · 25 comments

Comments

@tianon
Copy link
Owner

tianon commented Mar 9, 2022

NOTE: this list is no longer actively maintained; see #104 (comment):

With https://github.com/tianon/gosu/releases/tag/1.15, I've now got https://github.com/tianon/gosu/blob/master/SECURITY.md which makes it clear how to determine whether vulnerabilities apply to a released version/build of gosu (TLDR, the answer is now govulncheck, which checks for invocations of the actual vulnerable functionality).


CVEs that do not apply to builds of gosu:

If you use (or maintain) a security scanner which reports any of these against gosu, please report them to the security vendor as false positives.

(See also https://snarky.ca/the-social-contract-of-open-source/)

@HeyImAllan
Copy link

Dear @tianon,

I would like to respectfully ask if there are any plans on life cycling the golang packages in the near future?

Thank you.

@tianon
Copy link
Owner Author

tianon commented Jun 9, 2022

I try to keep the main development branch up-to-date with newer package versions, but I have no plans to make a new release of gosu unless there is a compelling reason to do so (changes to/CVEs in the actual codepaths gosu invokes, changes to gosu itself, etc).

@yuriy-yarosh
Copy link

yuriy-yarosh commented Aug 14, 2022

@tianon please make a minor 1.15 release to update the runc to 1.1.2 and make people happy.
golang.org/x/sys should be also updated to 0.0.0-20220412211240-33da011f77ad, according to trivy.

CVE wise I'm getting only two that actually bother me a bit CVE-2022-29162 / CVE-2022-29526

@tianon
Copy link
Owner Author

tianon commented Aug 17, 2022

@slakwa
Copy link

slakwa commented Aug 25, 2022

@tianon can you take a look at CVE-2022-30635? Our scanner started to show it lately.

@tianon
Copy link
Owner Author

tianon commented Aug 25, 2022

@ZimboQC
Copy link

ZimboQC commented Sep 15, 2022

Hi @tianon , Prisma found two new vulnerabilities :

Can you take a look? Thanks!

@tianon
Copy link
Owner Author

tianon commented Sep 15, 2022

similar to many of the CVEs that are listed, "does not use math/big" / "does not use net/http"

@yosifkit
Copy link
Collaborator

  • CVE-2022-2879 : Reader.Read does not set a limit on the maximum size of file headers. A maliciously crafted archive could cause Read to allocate unbounded amounts of memory, potentially causing resource exhaustion or panics. After fix, Reader.Read limits the maximum size of header blocks to 1 MiB.
  • CVE-2022-41715: Programs which compile regular expressions from untrusted sources may be vulnerable to memory exhaustion or denial of service. The parsed regexp representation is linear in the size of the input, but in some cases the constant factor can be as high as 40,000, making relatively small regexps consume much larger amounts of memory. After fix, each regexp being parsed is limited to a 256 MB memory footprint. Regular expressions whose representation would use more space than that are rejected. Normal use of regular expressions is unaffected.
  • CVE-2022-2880 : Requests forwarded by ReverseProxy include the raw query parameters from the inbound request, including unparseable parameters rejected by net/http. This could permit query parameter smuggling when a Go proxy forwards a parameter with an unparseable value. After fix, ReverseProxy sanitizes the query parameters in the forwarded query when the outbound request's Form field is set after the ReverseProxy. Director function returns, indicating that the proxy has parsed the query parameters. Proxies which do not parse query parameters continue to forward the original query parameters unchanged.

Can you please take a look if these are false positives as well ? Thanks

  1. gosu doesn't open archives
  2. gosu doesn't "compile regular expressions from untrusted sources"
  3. gosu doesn't make or receive any http(s) requests

@tianon
Copy link
Owner Author

tianon commented Dec 19, 2022

With https://github.com/tianon/gosu/releases/tag/1.15, I've now got https://github.com/tianon/gosu/blob/master/SECURITY.md which makes it clear how to determine whether vulnerabilities apply to a released version/build of gosu (TLDR, the answer is now govulncheck, which checks for invocations of the actual vulnerable functionality).

@tianon tianon closed this as completed Dec 19, 2022
@ThomasKroghMortensen
Copy link

ThomasKroghMortensen commented Jan 30, 2023

@tianon
Based on above mentioned https://github.com/tianon/gosu/blob/master/SECURITY.md, I see that two out of three new CVEs are not affecting [CVE-2022-32148, CVE-2022-41717], but the last one [CVE-2022-41716] is not covered, since it relates to Go os/exec?

CVE-2022-32148 is a net/http, so this is according to readme not affecting.
CVE-2022-41717 is a net/http, so this is according to readme not affecting.

CVE-2022-41716 is a os/exec - So does it mean it is affecting?

@tianon
Copy link
Owner Author

tianon commented Jan 30, 2023

Please run govulncheck on the binary to verify.

@ThomasKroghMortensen
Copy link

Thanks.

FYI:

# /gosu --version1.16 (go1.18.2 on linux/amd64; gc)
# govulncheck /gosu
govulncheck is an experimental tool. 
Share feedback at https://go.dev/s/govulncheck-feedback.
Scanning for dependencies with known vulnerabilities...
No vulnerabilities found.

# /gosu14 --version1.14 (go1.16.7 on linux/amd64; gc)
# govulncheck /gosu14
govulncheck is an experimental tool. 
Share feedback at https://go.dev/s/govulncheck-feedback.
Scanning for dependencies with known vulnerabilities...
govulncheck: vulncheck.Binary: binary built using unsupported Go Version: go1.16.7 

All fine - we will use redis 7.0.8 with gosu 1.16. (1.14 where where we had the CVEs), but we will upgrade to be sure.

@ganshnec1030

This comment was marked as resolved.

@tianon

This comment was marked as resolved.

@ganshnec1030

This comment was marked as resolved.

@tianon
Copy link
Owner Author

tianon commented Mar 31, 2023

$ ./gosu-amd64 --version
1.16 (go1.18.2 on linux/amd64; gc)

$ go install golang.org/x/vuln/cmd/govulncheck@latest
go: downloading golang.org/x/vuln v0.0.0-20230331150530-a42f9910daf3
go: downloading golang.org/x/mod v0.9.0
go: downloading golang.org/x/tools v0.7.0
go: downloading golang.org/x/sys v0.6.0

$ govulncheck ./gosu-amd64
govulncheck is an experimental tool. Share feedback at https://go.dev/s/govulncheck-feedback.

Using govulncheck@v0.0.0 with
vulnerability data from https://vuln.go.dev (last modified 2023-03-29 14:45:38 +0000 UTC).

Scanning your binary for known vulnerabilities...
No vulnerabilities found.

@ganshnec1030
Copy link

HI @tianon

Thank you for your time and response.

Just want to double-check, govulncheck is not showing CVE-2022-32190 CVE, so can we mark it as false positive?

@tianon
Copy link
Owner Author

tianon commented Apr 2, 2023

Please read https://github.com/tianon/gosu/blob/6a1967c98c3d1854dd29f32433f1e0c59b244c5f/SECURITY.md again, especially the third paragraph.

@thekaibosh
Copy link

@tianon would you add CVE-2023-28642 to this list please? I appreciate your position on CVEs related to go. I've got my SecOps team onboard with using this issue as justification for dismissing/reporting false postives

@tianon
Copy link
Owner Author

tianon commented May 15, 2023

Unfortunately, no, I will not be updating/maintaining this list. I made a lot of changes to the way I build/release in support of the updated security policy (https://github.com/tianon/gosu/blob/master/SECURITY.md), in which I now treat the results of govulncheck as canonical because that tool is going to do a much more thorough check of whether the functions gosu actually invokes are affected by a given vulnerability than I could possibly do myself (and in addition, I now run govulncheck on gosu at least weekly via a scheduled GitHub Actions CI job, which is also public in this repository).

@daniel-brenot
Copy link

Can I just ask if there is something about updating to a new version of golang that poses more effort than updating all of these vulnerability tools? I understand that this project doesn't use the parts of the code that have the CVE at the moment, but I can't help but wonder if it is less effort to just update the go version than it is to ask all of the tools to ignore the warnings for this tool.

@yuriy-yarosh

This comment was marked as abuse.

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

No branches or pull requests