Skip to content

Investigate bookworm C build reproducibility #38

@eniko1556

Description

@eniko1556

Summary

Bookworm examples that compile native binaries via the C toolchain produce different SHA1 hashes after the gcc-12 update (12.2.0-14 → 12.2.0-14+deb12u1) that shipped in Debian bookworm 12.11 (2025-05-17).

This update fixed CVE-2023-4039 which changed -fstack-protector handling, affecting the generated binary output.

Affected languages:

  • Chello-world_1.0.0-1_amd64.deb
  • Rusthello-world-rust_1.0.0-1_amd64.deb
  • Nimhello-world-nim_1.0.0-1_amd64.deb

All three compile to native code via gcc, which is why they are affected while other languages (Go, Java, JavaScript, etc.) are not.

Noble is unaffected as its toolchain has not changed since the hashes were set.

Resolution

Hashes have been updated to match the current bookworm toolchain output. Weekly scheduled tests will detect future drift.

Root cause

The sbuild chroot is created fresh from the current bookworm repo on each CI run. When Debian pushes toolchain updates (like the gcc-12 stack protector fix), the build output changes. There is no chroot pinning in pkg-builder's test workflow, unlike eth-nodes where the chroot tarball is saved as a release asset.

See #39 for implementing chroot pinning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions