VDB
Sign up
—

GO-2024-2825

Arbitrary code execution during build on Darwin in cmd/go

Quick fix

GO-2024-2825 — toolchain: upgrade to the fixed version with the command below.

go get toolchain@v1.21.10

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/toolchain
Introduced in: 0Fixed in: 1.21.10
Fixgo get toolchain@v1.21.10

References