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

[23.0 backport] Update to Go 1.21.12 in 23.0 #5284

Closed

Conversation

austinvazquez
Copy link
Contributor

- What I did
Backports Golang toolchain updates to 23.0

  1. update to go1.21.7 #4881
  2. update to go1.21.8 #4918
  3. update to go1.21.9 #4986
  4. update to go1.21.10 #5064
  5. Dockerfile: update ALPINE_VERSION to 3.20 #5090 - required to update to Golang v1.21.11
  6. update to go1.21.11 #5117
  7. update to go1.21.12 #5218

- How I did it

git cherry-pick -xsS 20b9d489e044b7e1d65d3c568a147fb9a91a5113
git cherry-pick -xsS 3b7747794392e448a9b5ea9cef85972258e0aa2b
git cherry-pick -xsS 0a5bd6c75b8b70a74478d1f679516114213f0a6e
git cherry-pick -xsS eb99994c75752c78e08c902ea02e7f359bad1af7
git cherry-pick -xsS e70f68595d26d935a09ead0f0fe6dd1c6c518d80
git cherry-pick -xsS 630e1d3e95b18da36dbb53f516c54ee00f2e421f
git cherry-pick -xsS d73d7d4ed3f6211aa157d59a2e6674a1774dabc3

- How to verify it
CI must be successful

- Description for the changelog

Update Go toolchain in CI to v1.21.12

- A picture of a cute animal (not mandatory but encouraged)

@austinvazquez
Copy link
Contributor Author

Built and unit tested along the way. Mostly good in CI run, but looks like I will need to include a commit to update the golang linter and address any warnings. Will take another look before taking this out of draft.

thaJeztah and others added 8 commits July 23, 2024 23:25
go1.21.7 (released 2024-02-06) includes fixes to the compiler, the go command,
the runtime, and the crypto/x509 package. See the Go 1.21.7 milestone on our
issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.7+label%3ACherryPickApproved
- full diff: golang/go@go1.21.6...go1.21.7

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 20b9d48)
Signed-off-by: Austin Vazquez <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit db6209a)
Signed-off-by: Austin Vazquez <[email protected]>
go1.21.8 (released 2024-03-05) includes 5 security fixes:

- crypto/x509: Verify panics on certificates with an unknown public key algorithm (CVE-2024-24783, https://go.dev/issue/65390)
- net/http: memory exhaustion in Request.ParseMultipartForm (CVE-2023-45290, https://go.dev/issue/65383)
- net/http, net/http/cookiejar: incorrect forwarding of sensitive headers and cookies on HTTP redirect (CVE-2023-45289, https://go.dev/issue/65065)
- html/template: errors returned from MarshalJSON methods may break template escaping (CVE-2024-24785, https://go.dev/issue/65697)
- net/mail: comments in display names are incorrectly handled (CVE-2024-24784, https://go.dev/issue/65083)

View the release notes for more information:
https://go.dev/doc/devel/release#go1.21.8

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.8+label%3ACherryPickApproved
- full diff: golang/go@go1.21.6...go1.21.8

Signed-off-by: Paweł Gronowski <[email protected]>
(cherry picked from commit 3b77477)
Signed-off-by: Austin Vazquez <[email protected]>
go1.21.9 (released 2024-04-03) includes a security fix to the net/http
package, as well as bug fixes to the linker, and the go/types and
net/http packages. See the Go 1.21.9 milestone on our issue tracker for
details.

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.9+label%3ACherryPickApproved
- full diff: golang/go@go1.21.8...go1.21.9

**- Description for the changelog**

```markdown changelog
Update Go runtime to 1.21.9
```

Signed-off-by: Paweł Gronowski <[email protected]>
(cherry picked from commit 0a5bd6c)
Signed-off-by: Austin Vazquez <[email protected]>
These minor releases include 2 security fixes following the security policy:

- cmd/go: arbitrary code execution during build on darwin
On Darwin, building a Go module which contains CGO can trigger arbitrary code execution when using the Apple version of ld, due to
usage of the -lto_library flag in a "#cgo LDFLAGS" directive.
Thanks to Juho Forsén of Mattermost for reporting this issue.
This is CVE-2024-24787 and Go issue https://go.dev/issue/67119.

- net: malformed DNS message can cause infinite loop
A malformed DNS message in response to a query can cause the Lookup functions to get stuck in an infinite loop.
Thanks to long-name-let-people-remember-you on GitHub for reporting this issue, and to Mateusz Poliwczak for bringing the issue to
our attention.
This is CVE-2024-24788 and Go issue https://go.dev/issue/66754.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.22.3

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.10+label%3ACherryPickApproved
- full diff: golang/go@go1.21.9...go1.21.10

**- Description for the changelog**

```markdown changelog
Update Go runtime to 1.21.10
```

Signed-off-by: Paweł Gronowski <[email protected]>
(cherry picked from commit eb99994)
Signed-off-by: Austin Vazquez <[email protected]>
Update to the current version of Alpine, which is also the default for
the golang:alpine image

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit e70f685)
Signed-off-by: Austin Vazquez <[email protected]>
go1.21.11 (released 2024-06-04) includes security fixes to the archive/zip
and net/netip packages, as well as bug fixes to the compiler, the go command,
the runtime, and the os package. See the Go 1.21.11 milestone on our issue
tracker for details;

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.11+label%3ACherryPickApproved
- full diff: golang/go@go1.21.10...go1.21.11

From the security announcement;

We have just released Go versions 1.22.4 and 1.21.11, minor point releases.
These minor releases include 2 security fixes following the security policy:

- archive/zip: mishandling of corrupt central directory record

  The archive/zip package's handling of certain types of invalid zip files
  differed from the behavior of most zip implementations. This misalignment
  could be exploited to create an zip file with contents that vary depending
  on the implementation reading the file. The archive/zip package now rejects
  files containing these errors.

  Thanks to Yufan You for reporting this issue.

  This is CVE-2024-24789 and Go issue https://go.dev/issue/66869.

- net/netip: unexpected behavior from Is methods for IPv4-mapped IPv6 addresses

  The various Is methods (IsPrivate, IsLoopback, etc) did not work as expected
  for IPv4-mapped IPv6 addresses, returning false for addresses which would
  return true in their traditional IPv4 forms.

  Thanks to Enze Wang of Alioth and Jianjun Chen of Zhongguancun Lab
  for reporting this issue.

  This is CVE-2024-24790 and Go issue https://go.dev/issue/67680.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 630e1d3)
Signed-off-by: Austin Vazquez <[email protected]>
- https://github.com/golang/go/issues?q=milestone%3AGo1.21.12+label%3ACherryPickApproved
- full diff: golang/go@go1.21.11...go1.21.12

These minor releases include 1 security fixes following the security policy:

net/http: denial of service due to improper 100-continue handling

The net/http HTTP/1.1 client mishandled the case where a server responds to a request with an "Expect: 100-continue" header with a non-informational (200 or higher) status. This mishandling could leave a client connection in an invalid state, where the next request sent on the connection will fail.

An attacker sending a request to a net/http/httputil.ReverseProxy proxy can exploit this mishandling to cause a denial of service by sending "Expect: 100-continue" requests which elicit a non-informational response from the backend. Each such request leaves the proxy with an invalid connection, and causes one subsequent request using that connection to fail.

Thanks to Geoff Franks for reporting this issue.

This is CVE-2024-24791 and Go issue https://go.dev/issue/67555.
View the release notes for more information:
https://go.dev/doc/devel/release#go1.21.12

**- Description for the changelog**

```markdown changelog
Update Go runtime to 1.21.12
```

Signed-off-by: Paweł Gronowski <[email protected]>
(cherry picked from commit d73d7d4)
Signed-off-by: Austin Vazquez <[email protected]>
@austinvazquez austinvazquez force-pushed the update-golang-in-23.0 branch from 7d18f13 to 48af47b Compare July 24, 2024 04:14
@austinvazquez
Copy link
Contributor Author

Superseded by #5404. Closing.

@austinvazquez austinvazquez deleted the update-golang-in-23.0 branch September 4, 2024 23:32
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 this pull request may close these issues.

3 participants