Review report

bitcoin/bitcoin: PR #25573

1 major finding · 1 minor finding · 3 suggestions

Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive for their assessments.

Findings

Link

[major] · Static-PIE outputs fail the unchanged FORTIFY packaging check

The new x86_64/aarch64 static-PIE executables have no imported fortified symbols, so the unchanged FORTIFY check rejects non-wrapper outputs and stops Guix packaging before archive creation.

Location: contrib/guix/libexec/build_linux.sh:48 (head).

Details and suggested fix

check_ELF_FORTIFY requires at least one imported __*_chk symbol, excluding the stack protector. Static-PIE executables define their fortified functions locally instead, and the new check_ELF_STATIC explicitly requires zero imports. The bitcoin wrapper has a string-based exemption, but outputs such as bitcoind do not. Both architectures require FORTIFY, and the GUI stage preserves the non-GUI installation before package.sh checks every executable under errexit. Add a static-ELF FORTIFY path that verifies fortified calls in application code while retaining the imported-symbol check for dynamic executables. Merely finding linked glibc implementations in .symtab would not establish application fortification. No release build was run.


Link

[minor] · Static-PIE executable links lose fatal linker warnings

Linker warnings no longer fail x86_64 and aarch64 Guix executable links, although the existing policy exempts only riscv64; no warning from the current links was identified.

Location: contrib/guix/libexec/build_linux.sh:48 (head).

Details and suggested fix

HOST_LDFLAGS still receives -Wl,--fatal-warnings, but the new static branch omits it from the explicit CMAKE_EXE_LINKER_FLAGS value. Supplying LDFLAGS in the environment does not restore it because that only initializes an unset cache entry. TryAppendLinkerFlag.cmake also uses fatal warnings only for configuration probes. Add -Wl,--fatal-warnings directly to the static branch to preserve the executable-link validation gate without restoring the dynamic-interpreter flags.


Optional improvements

Link

[suggestion] · Embedded glibc resolver has no documented update process

Host glibc updates no longer patch the resolver embedded in x86_64/aarch64 non-GUI release binaries, but the change does not document how glibc fixes will reach supported releases.

Location: contrib/guix/toolchains.scm:306 (head).

Details and suggested fix

These binaries now embed glibc from commit 21442dba…. Hostname resolution reaches its getaddrinfo, including DNS-seed queries when no name proxy is configured, so the bundled implementation parses network-sourced DNS replies. Disabling external NSS module loading does not remove that maintenance responsibility. If the resolver needs a security fix, users need updated Bitcoin Core binaries rather than only a distribution glibc update. Static libstdc++ and depends libraries already follow a bundled-update model, but the process should explicitly cover glibc advisories and pin updates on maintained release branches. Also document in the release note that host glibc updates no longer patch these binaries. No vulnerability in the pinned revision is established.


Link

[suggestion] · Release note omits the dynamically linked bitcoin-gui exception

The note excludes only bitcoin-qt from the static-PIE portability claim, but libexec/bitcoin-gui also remains dynamically linked against glibc.

Location: doc/release-notes-25573.md:4 (head).

Details and suggested fix

build_linux_gui.sh builds and installs both bitcoin-gui and bitcoin-qt with the dynamic HOST_LDFLAGS, including --dynamic-linker, using the glibc 2.31 toolchain. bitcoin-gui is the multiprocess GUI launched by bitcoin -m gui, so that command still requires a compatible host glibc rather than gaining the advertised non-glibc portability. Name both GUI executables as exceptions in the release note.


Link

[suggestion] · Static ELF failures bypass named check reporting

The new static path aborts on assertions instead of reporting named failures, and Python optimization removes all validation inside its helper.

Location: contrib/guix/symbol-check.py:300 (head).

Details and suggested fix

Every check in check_ELF_STATIC is an assert, and the caller discards its return value. A violation therefore raises an uncaught AssertionError, without the usual <file>: failed <CHECK> report, and leaves later files unchecked. With -O or PYTHONOPTIMIZE, all helper checks disappear, so an interpreter-free ELF passes this script regardless of imports, library dependencies, ABI or runpath. Use explicit predicates and route failures through the normal named failed list, including ABI and runpath validation. Packaging currently runs plain python3 in a pure Guix container; no current caller enabling optimization was found.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.