** Also affects: golang-1.24 (Ubuntu)
Importance: Undecided
Status: New
** Also affects: golang-1.25 (Ubuntu)
Importance: Undecided
Status: New
** Also affects: golang-1.27 (Ubuntu)
Importance: Undecided
Status: New
** No longer affects: golang-1.24 (Ubuntu Stonking)
** No longer affects: golang-1.25 (Ubuntu Stonking)
** No longer affects: golang-1.27 (Ubuntu Jammy)
** No longer affects: golang-1.27 (Ubuntu Noble)
** No longer affects: golang-1.27 (Ubuntu Resolute)
** Changed in: golang-1.24 (Ubuntu)
Status: New => Won't Fix
** Changed in: golang-1.25 (Ubuntu)
Status: New => Won't Fix
** Merge proposal linked:
https://code.launchpad.net/~sumit-tiwari/ubuntu/+source/golang-1.25/+git/golang-1.25/+merge/514782
** Merge proposal linked:
https://code.launchpad.net/~sumit-tiwari/ubuntu/+source/golang-1.25/+git/golang-1.25/+merge/514779
** Merge proposal linked:
https://code.launchpad.net/~sumit-tiwari/ubuntu/+source/golang-1.25/+git/golang-1.25/+merge/514778
** Merge proposal linked:
https://code.launchpad.net/~sumit-tiwari/ubuntu/+source/golang-1.24/+git/golang-1.24/+merge/514789
** Merge proposal linked:
https://code.launchpad.net/~sumit-tiwari/ubuntu/+source/golang-1.24/+git/golang-1.24/+merge/514788
** Merge proposal linked:
https://code.launchpad.net/~sumit-tiwari/ubuntu/+source/golang-1.24/+git/golang-1.24/+merge/514784
** Merge proposal linked:
https://code.launchpad.net/~sumit-tiwari/ubuntu/+source/golang-1.27/+git/golang-1.27/+merge/515044
** Description changed:
[Impact]
* Ubuntu's package build process uses dh_strip_nondeterminism, which modifies
the timestamps and entry order of the bundled FIPS 140 snapshot ZIPs in golang
src packages. While the decompressed files remain identical, this metadata
change alters the SHA-256 hash of the ZIP archives, causing a mismatch with the
upstream fips140.sum.
* While the Go 1.24–1.26 compilers do not strictly abort at runtime due to
this mismatch (unlike Go 1.27), the packages currently ship with invalid
checksums that violate FIPS integrity expectations.
- * The fix resolves this by excluding usr/share/go-$(GOVER)/lib/fips140/*.zip
from dh_strip_nondeterminism in debian/rules, preserving the certified archives
byte-for-byte.
+ * The fix resolves this by excluding usr/share/go-$(GOVER)/lib/fips140/ from
dh_strip_nondeterminism in debian/rules, preserving the certified archives
byte-for-byte.
[Test Plan]
+ Run the following steps for each affected Go version (1.24, 1.25, 1.26, or
1.27):
1. Install the matching Go compiler and source packages.
2. Compare the SHA-256 hash of the bundled FIPS 140 archives against the
expected upstream digest:
- $ sha256sum /usr/share/go-1.26/lib/fips140/*.zip
- $ cat /usr/share/go-1.26/lib/fips140/fips140.sum
+ $ sha256sum /usr/share/go-${GOVER}/lib/fips140/*.zip
+ $ cat /usr/share/go-${GOVER}/lib/fips140/fips140.sum
3. Without the fix, the hash is incorrect due to the altered metadata.
4. With the fix applied, the SHA-256 hash will perfectly match the expected
certified upstream digest.
5. Verify the compiler still functions correctly in FIPS mode:
cat >/tmp/fips-check.go <<'EOF'
package main
import (
"crypto/fips140"
"fmt"
)
func main() {
if !fips140.Enabled() {
panic("FIPS mode is disabled")
}
fmt.Println("FIPS mode enabled")
}
EOF
GOFIPS140=v1.0.0 GOTOOLCHAIN=local CGO_ENABLED=0 GODEBUG= \
GOPATH="$(mktemp -d)" GOCACHE="$(mktemp -d)" \
- /usr/lib/go-1.26/bin/go run /tmp/fips-check.go
+ /usr/lib/go-${GOVER}/bin/go run /tmp/fips-check.go
- 6. The command should successfully output "FIPS mode enabled".
+ 6. The command should succeed and output "FIPS mode enabled" (on Go
+ 1.27, this fails prior to the fix due to the checksum mismatch).
[Where problems could occur]
- * This fix is very specific. It just tells dh_strip_nondeterminism to ignore
the FIPS module ZIP files during the build.
- * Because of this, those specific ZIP files will keep their original
timestamps and internal sorting order instead of being modified by the Debian
build process. Since the fix only affects these exact zip files, there is no
risk of it breaking the rest of the Go compiler or the standard libraries.
+ * The change only passes --exclude=usr/share/go-$(GOVER)/lib/fips140/ to
dh_strip_nondeterminism in debian/rules; no Go compiler or standard library
code is modified.
+ * Because the entire lib/fips140/ directory is excluded from
dh_strip_nondeterminism, files in that directory retain their upstream metadata
rather than being normalized during the Debian build. If upstream were to
introduce non-deterministic metadata in that directory in a future release,
binary build reproducibility for golang-$(GOVER)-src could be affected, though
upstream generates these snapshot ZIPs deterministically.
** Changed in: golang-1.26 (Ubuntu)
Status: Fix Released => In Progress
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174696
Title:
FIPS 140 snapshot checksum mismatch due to dh_strip_nondeterminism
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/golang-1.24/+bug/2174696/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs