Linking any Rust staticlib that pulls in Rust std via #cgo LDFLAGS: -L⦠-ladder now fails on go1.27.4 and go1.26.11 with disallowed LTO section __LLVM,__bitcode in #cgo LDFLAGS (darwin) or .llvmbc (linux). It worked on go1.27.3 and go1.26.10. The cause is CL 862151, the fix for security issue #82572 ("arbitrary code execution via crafted .syso files and cgo linker input files", one of the cgo/linker CVEs shipped in the 11-10 point releases). Rust std objects carry an embedded bitcode section, so they trip the new check. Teleport maintainers report the same breakage. Ian Lance Taylor noted there's no escape hatch like CGO_CFLAGS_ALLOW. Roland Shoemaker (Go security) called it an oversight and a clear regression with no reasonable workaround: .llvmbc, .llvmcmd and __LLVM,__bitcode should be safe. He has posted CL 864082 ("allow embedded LLVM bitcode sections and honor CGO_LDFLAGS_ALLOW"), and gopherbot opened backports #83136 (1.27) and #83135 (1.26) at 04:07 IST today.
CGO_LDFLAGS_ALLOW work as the documented bypass for this check. Pure-Go and gcc-only cgo builds aren't affected by this report.