UBUNTU-CVE-2023-29404
The go command may execute arbitrary code at build time when using cgo. This may occur when running "go get" on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a "#cgo LDFLAGS" directive. The arguments for a number of flags which are non-optional are incorrectly considered optional, allowing disallowed flags to be smuggled through the LDFLAGS sanitization. This affects usage of both the gc and gccgo compilers.
02 / AFFECTED SOFTWARE
Affected packages
1 explicit affected versions
2 explicit affected versions
10 explicit affected versions
8 explicit affected versions
2 explicit affected versions
5 explicit affected versions
10 explicit affected versions
9 explicit affected versions
2 explicit affected versions
2 explicit affected versions
4 explicit affected versions
7 explicit affected versions
2 explicit affected versions
4 explicit affected versions
1 explicit affected versions
4 explicit affected versions
2 explicit affected versions
2 explicit affected versions
3 explicit affected versions
4 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
The go command may execute arbitrary code at build time when using cgo. This may occur when running "go get" on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a "#cgo LDFLAGS" directive. The arguments for a number of flags which are non-optional are incorrectly considered optional, allowing disallowed flags to be smuggled through the LDFLAGS sanitization. This affects usage of both the gc and gccgo compilers.
05 / REFERENCES
Further evidence
- https://github.com/golang/go/commit/356a419e2f811b65d227abcea1a346f8dcb154e0
- https://github.com/golang/go/commit/bf3c8ce03e175e870763901a3850bca01381a828
- https://github.com/golang/go/issues/60305
- https://groups.google.com/g/golang-announce/c/q5135a9d924
- https://ubuntu.com/security/CVE-2023-29404
- https://ubuntu.com/security/notices/USN-7061-1
- https://ubuntu.com/security/notices/USN-7109-1
- https://www.cve.org/CVERecord?id=CVE-2023-29404