-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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.5] Update go 1.18.7, addresses CVE-2022-2879, CVE-2022-2880, CVE-2022-41715 #7476
Conversation
Hm... need to update golang-ci-lint
|
970971e
to
0b007d9
Compare
Added some commits to address the |
Okay; one more fix needed it looks like;
|
0b007d9
to
943ae44
Compare
CI failing
https://github.com/containerd/containerd/actions/runs/3193263827/jobs/5211649800 |
9b8dc0a
to
0ca4b95
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Something weird happening and it doesn't make sense; removing the working-dir from several places in the actions yaml does match the other branches, but seems specifically for integration runs the action job is failing due to not being in the right directory or some path construction is incorrect? Didn't have much time to dig deeper, but definitely an issue there |
Yes, it's odd (and these things are "fun" as you cannot try them locally 😞). Let me at least add a commit to update the golang.org/x/sys version to see if the macOS failure goes away (and open a separate PR for that); I'll use the same version as we used in the 1.6 branch (to not get too far ahead); taken from / same as 6ee5bb7 |
9d97015
to
f4e64a4
Compare
This comment was marked as resolved.
This comment was marked as resolved.
ae80711
to
219ebba
Compare
Okay remaining issues; Linux:
macOS (during installing gotestsum):
Which I can reproduce locally; looks like gotestsum is the one failing because it depends on an old version of golang.org/x/sys, so we need |
The current release of gotestsum is missing timestamps in the junit data, which makes it difficult to import in an external system later. gotestyourself/gotestsum@012a85e includes the necessary changes to add the timestamp for the test run to the junit output. Signed-off-by: Brian Goff <cpuguy83@gmail.com> (cherry picked from commit bfbebf0) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
removes golang.org/x/cryto dependency: full diff: gotestyourself/gotestsum@012a85e...1a94380 Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 603962b) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Same as previous commit, but a release was tagged; gotestyourself/gotestsum@1a94380...v1.7.0 Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 18d6cc1) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
https://go.dev/doc/go-get-install-deprecation Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com> (cherry picked from commit 6b0e241) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
it looks like golangci-lint's gofmt check uses go1.19 rules, despite being run with go1.18. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com> (cherry picked from commit 3a3f43f) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
For compatibility with Go 1.18 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
CVE-2022-41715 From the mailing list: We have just released Go versions 1.19.2 and 1.18.7, minor point releases. These minor releases include 3 security fixes following the security policy: - archive/tar: unbounded memory consumption when reading headers Reader.Read did 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. Reader.Read now limits the maximum size of header blocks to 1 MiB. Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue. This is CVE-2022-2879 and Go issue https://go.dev/issue/54853. - net/http/httputil: ReverseProxy should not forward unparseable query parameters Requests forwarded by ReverseProxy included 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. ReverseProxy will now sanitize 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. Thanks to Gal Goldstein (Security Researcher, Oxeye) and Daniel Abeles (Head of Research, Oxeye) for reporting this issue. This is CVE-2022-2880 and Go issue https://go.dev/issue/54663. - regexp/syntax: limit memory used by parsing regexps 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. Each regexp being parsed is now limited to a 256 MB memory footprint. Regular expressions whose representation would use more space than that are now rejected. Normal use of regular expressions is unaffected. Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue. This is CVE-2022-41715 and Go issue https://go.dev/issue/55949. View the release notes for more information: https://go.dev/doc/devel/release#go1.18.7 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io> (cherry picked from commit 047e684) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
219ebba
to
f109930
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
From the mailing list:
We have just released Go versions 1.19.2 and 1.18.7, minor point releases.
These minor releases include 3 security fixes following the security policy:
archive/tar: unbounded memory consumption when reading headers
Reader.Read did 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. Reader.Read now limits the maximum size of header blocks to 1 MiB.
Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue.
This is CVE-2022-2879 and Go issue https://go.dev/issue/54853.
net/http/httputil: ReverseProxy should not forward unparseable query parameters
Requests forwarded by ReverseProxy included 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.
ReverseProxy will now sanitize 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.
Thanks to Gal Goldstein (Security Researcher, Oxeye) and Daniel Abeles (Head of Research, Oxeye) for reporting this issue.
This is CVE-2022-2880 and Go issue https://go.dev/issue/54663.
regexp/syntax: limit memory used by parsing regexps
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.
Each regexp being parsed is now limited to a 256 MB memory footprint. Regular expressions whose representation would use more space than that are now rejected. Normal use of regular expressions is unaffected.
Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue.
This is CVE-2022-41715 and Go issue https://go.dev/issue/55949.
View the release notes for more information: https://go.dev/doc/devel/release#go1.18.7