Summary
This update for go1.22 fixes the following issues:
- go1.22.1 (released 2024-03-05) includes security fixes to the
crypto/x509, html/template, net/http, net/http/cookiejar, and
net/mail packages, as well as bug fixes to the compiler, the go
command, the runtime, the trace command, and the go/types and
net/http packages. (bsc#1218424)
CVE-2023-45289 CVE-2023-45290 CVE-2024-24783 CVE-2024-24784 CVE-2024-24785
* go#65831 go#65390 bsc#1220999 security: fix CVE-2024-24783 crypto/x509: Verify panics on certificates with an unknown public key algorithm
* go#65849 go#65083 bsc#1221002 security: fix CVE-2024-24784 net/mail: comments in display names are incorrectly handled
* go#65850 go#65383 bsc#1221001 security: fix CVE-2023-45290 net/http: memory exhaustion in Request.ParseMultipartForm
* go#65859 go#65065 bsc#1221000 security: fix CVE-2023-45289 net/http, net/http/cookiejar: incorrect forwarding of sensitive headers and cookies on HTTP redirect
* go#65969 go#65697 bsc#1221003 security: fix CVE-2024-24785 html/template: errors returned from MarshalJSON methods may break template escaping
* go#65352 cmd/go: go generate fails silently when run on a package in a nested workspace module
* go#65471 internal/testenv: TestHasGoBuild failures on the LUCI noopt builders
* go#65474 internal/testenv: support LUCI mobile builders in testenv tests
* go#65577 cmd/trace/v2: goroutine analysis page doesn't identify goroutines consistently
* go#65618 cmd/compile: Go 1.22 build fails with 1.21 PGO profile on internal/saferio change
* go#65619 cmd/compile: Go 1.22 changes support for modules that declare go 1.0
* go#65641 cmd/cgo/internal/testsanitizers,x/build: LUCI clang15 builders failing
* go#65644 runtime: crash in race detector when execution tracer reads from CPU profile buffer
* go#65728 go/types: nil pointer dereference in Alias.Underlying()
* go#65759 net/http: context cancellation can leave HTTP client with deadlocked HTTP/1.1 connections in Go1.22
* go#65760 runtime: Go 1.22.0 fails to build from source on armv7 Alpine Linux
* go#65818 runtime: go1.22.0 test with -race will SIGSEGV or SIGBUS or Bad Pointer
* go#65852 cmd/go: 'missing ziphash' error with go.work
* go#65883 runtime: scheduler sometimes starves a runnable goroutine on wasm platforms
- Packaging improvements:
* bsc#1219988 ensure VERSION file is present in GOROOT
as required by go tool dist and go tool distpack
- go1.22 (released 2024-02-06) is a major release of Go.
go1.22.x minor releases will be provided through February 2024.
https://github.com/golang/go/wiki/Go-Release-Cycle
go1.22 arrives six months after go1.21. Most of its changes are
in the implementation of the toolchain, runtime, and libraries.
As always, the release maintains the Go 1 promise of
compatibility. We expect almost all Go programs to continue to
compile and run as before. (bsc#1218424)
* Language change: go1.22 makes two changes to for loops.
Previously, the variables declared by a for loop were created
once and updated by each iteration. In go1.22, each iteration
of the loop creates new variables, to avoid accidental sharing
bugs. The transition support tooling described in the proposal
continues to work in the same way it did in Go 1.21.
* Language change: For loops may now range over integers
* Language change: go1.22 includes a preview of a language change
we are considering for a future version of Go:
range-over-function iterators. Building with
GOEXPERIMENT=rangefunc enables this feature.
* go command: Commands in workspaces can now use a vendor
directory containing the dependencies of the workspace. The
directory is created by go work vendor, and used by build
commands when the -mod flag is set to vendor, which is the
default when a workspace vendor directory is present. Note
that the vendor directory's contents for a workspace are
different from those of a single module: if the directory at
the root of a workspace also contains one of the modules in the
workspace, its vendor directory can contain the dependencies of
either the workspace or of the module, but not both.
* go get is no longer supported outside of a module in the legacy
GOPATH mode (that is, with GO111MODULE=off). Other build
commands, such as go build and go test, will continue to work
indefinitely for legacy GOPATH programs.
* go mod init no longer attempts to import module requirements
from configuration files for other vendoring tools (such as
Gopkg.lock).
* go test -cover now prints coverage summaries for covered
packages that do not have their own test files. Prior to Go
1.22 a go test -cover run for such a package would report: ?
mymod/mypack [no test files] and now with go1.22, functions in
the package are treated as uncovered: mymod/mypack coverage:
0.0% of statements Note that if a package contains no
executable code at all, we can't report a meaningful coverage
percentage; for such packages the go tool will continue to
report that there are no test files.
* trace: The trace tool's web UI has been gently refreshed as
part of the work to support the new tracer, resolving several
issues and improving the readability of various sub-pages. The
web UI now supports exploring traces in a thread-oriented
view. The trace viewer also now displays the full duration of
all system calls. These improvements only apply for viewing
traces produced by programs built with go1.22 or newer. A
future release will bring some of these improvements to traces
produced by older version of Go.
* vet: References to loop variables The behavior of the vet tool
has changed to match the new semantics (see above) of loop
variables in go1.22. When analyzing a file that requires go1.22
or newer (due to its go.mod file or a per-file build
constraint), vetcode> n
Fixed packages 1
| Release | Package | Fixed in |
|---|---|---|
| SUSE · SLES 12 SP5 Linux Enterprise Software Development Kit 12 SP5 | go1.22 | 1.22.1-1.3.1 |
Vulnerabilities 5
-
High 7.5
Comments in display names are incorrectly handled in net/mail
The ParseAddressList function incorrectly handles comments (text within parentheses) within display names. Since this is a misalignment with conforming address parsers, it can result in different trust decisions being made by programs using different parsers.
-
Medium 6.5
Memory exhaustion in multipart form parsing in net/textproto and net/http
When parsing a multipart form (either explicitly with Request.ParseMultipartForm or implicitly with Request.FormValue, Request.PostFormValue, or Request.FormFile), limits on the total size of the parsed form were not applied to the memory consumed while readi…
-
Medium 5.9
Verify panics on certificates with an unknown public key algorithm in crypto/x509
Verifying a certificate chain which contains a certificate with an unknown public key algorithm will cause Certificate.Verify to panic. This affects all crypto/tls clients, and servers that set Config.ClientAuth to VerifyClientCertIfGiven or RequireAndVerifyC…
-
Medium 5.4
Errors returned from JSON marshaling may break template escaping in html/template
If errors returned from MarshalJSON methods contain user controlled data, they may be used to break the contextual auto-escaping behavior of the html/template package, allowing for subsequent actions to inject unexpected content into templates.
-
Medium 4.3
Incorrect forwarding of sensitive headers and cookies on HTTP redirect in net/http
When following an HTTP redirect to a domain which is not a subdomain match or exact match of the initial domain, an http.Client does not forward sensitive headers such as "Authorization" or "Cookie". For example, a redirect from foo.com to www.foo.com will fo…
References
-
report
https://bugzilla.suse.com/1218424
-
report
https://bugzilla.suse.com/1219988
-
report
https://bugzilla.suse.com/1220999
-
report
https://bugzilla.suse.com/1221000
-
report
https://bugzilla.suse.com/1221001
-
report
https://bugzilla.suse.com/1221002
-
report
https://bugzilla.suse.com/1221003
-
web
https://www.suse.com/security/cve/CVE-2023-45289
-
web
https://www.suse.com/security/cve/CVE-2023-45290
-
web
https://www.suse.com/security/cve/CVE-2024-24783
-
web
https://www.suse.com/security/cve/CVE-2024-24784
-
web
https://www.suse.com/security/cve/CVE-2024-24785