1 minor finding · 4 suggestions
Earlier concerns neither republished nor resolved: 2 minor findings · 1 suggestion. See the Run archive for their assessments.
Findings
[minor] · Static PIE flags omit fatal linker warnings
On x86_64 and aarch64, linker warnings no longer fail the Guix build, although the policy exempts only riscv64; no warning emitted by current links was identified.
Location: contrib/guix/libexec/build_linux.sh:48 (head).
Details and suggested fix
For aarch64-linux-gnu and x86_64-linux-gnu, the later -DCMAKE_EXE_LINKER_FLAGS value replaces the earlier one. It sets -static-pie -static-libgcc -Wl,-O2 and omits HOST_LDFLAGS, including -Wl,--fatal-warnings. Setting LDFLAGS in the environment does not restore the option because CMake uses it to initialize the linker flags only when they were not already set with -D. Consequently, a linker warning on either target would no longer stop the build. Examples include glibc's static-link warning for a newly added dlopen call and a binutils RWX-segment warning. The NSS patch's removal of glibc's NSS static-link warnings suggests warning-free links were intended, but no warning emitted by these links today was identified. Build one linker-flags value per host, include -Wl,--fatal-warnings for the static hosts, and pass -DCMAKE_EXE_LINKER_FLAGS only once. This also removes the duplicate flag at line 49.
Optional improvements
[suggestion] · Static ELF FORTIFY check accepts binaries without checking Bitcoin Core's code
For static binaries, the release gate no longer detects lost _FORTIFY_SOURCE hardening; this is a coverage gap, not evidence that current binaries lack hardening.
Location: contrib/guix/security-check.py:130 (head).
Details and suggested fix
check_ELF_FORTIFY now returns True for any ELF with no interpreter. The comment cites glibc's --enable-fortify-source setting, but that option affects glibc's objects; Bitcoin Core's objects receive -D_FORTIFY_SOURCE=3 separately, only when CMake's cxx_supports_fortify_source check passes. The previous import-based check does not work for static binaries, but the replacement accepts any static bitcoind, bitcoin-cli, or other CLI tool, so a regression specific to the static toolchain would pass packaging. Dynamic builds for arm, powerpc64, and riscv64 still use the import-based check against the same CMake logic, so a project-wide flag regression would probably still be caught. package.sh runs this check before split-debug, when the full symbol table is available. Replace the unconditional pass with a check that works for static binaries, such as checking for __*_chk references in the unstripped symbol table. If that cannot distinguish application calls from glibc's, report FORTIFY as unchecked for static binaries and correct the comment.
[suggestion] · Static binaries embed a pinned glibc resolver without a stated update process
On x86_64 and aarch64, hostname lookups use glibc from a pinned 2.44 commit, and the PR does not explain how later glibc security fixes will reach users.
Location: contrib/guix/toolchains.scm:297 (head).
Details and suggested fix
Before this change, release bitcoind loaded the host's libc.so.6, so distribution glibc updates also fixed getaddrinfo and the DNS resolver. The x86_64 and aarch64 binaries now embed glibc from commit 34106fee… on release/2.44/master. The NSS patch stops loading external modules, but the built-in files and dns paths remain; WrappedGetAddrInfo calls getaddrinfo. DNS-seed lookups and hostname values for -addnode, -connect, and -seednode therefore reach the embedded resolver, which parses network DNS replies. If a glibc resolver flaw is found, an OS update will not fix these binaries; a Bitcoin Core release with an updated pin will be needed. The release note covers the NSS-module change but not this update requirement. The project already ships static libstdc++ and dependent libraries, but glibc's resolver is a network-facing parser. State how glibc security releases will be tracked and the pin updated, including on maintained release branches. Also note that host glibc updates no longer apply to these binaries.
[suggestion] · Linux runtime requirements omit bitcoin-gui and conflict with INSTALL.md
The release note omits bitcoin-gui as a dynamically linked exception, while the shipped INSTALL.md still says all Bitcoin Core binaries require glibc 2.31 or newer.
Location: doc/release-notes-25573.md:4 (head).
Details and suggested fix
The release note says every x86_64 and aarch64 Linux release binary except bitcoin-qt is now -static-pie. However, build_linux_gui.sh also builds and installs bitcoin-gui with the dynamic-linker flags and the glibc 2.31 toolchain. It therefore still needs a compatible host glibc, and bitcoin gui runs it when multiprocess is used. Meanwhile, doc/INSTALL_linux.md says, “Bitcoin Core requires glibc (GNU C Library) 2.31 or newer,” and package.sh copies that file into every Linux archive as INSTALL.md. Users of static CLI binaries therefore receive conflicting requirements. List both bitcoin-qt and bitcoin-gui as exceptions, correct the wording about older glibc systems, and limit the glibc 2.31 requirement in INSTALL_linux.md to the GUI executables and other Linux architectures.
[suggestion] · Static symbol check allows unexpected x86_64 exports
The static ELF check allows up to two unexpected exports on x86_64, despite its comment saying static binaries export none; no current export was identified.
Location: contrib/guix/symbol-check.py:301 (head).
Details and suggested fix
For ELF files without an interpreter, the main loop calls check_ELF_STATIC and skips the normal checks, including check_exported_symbols. check_ELF_STATIC only asserts that there are at most three dynamic symbols. That limit reflects the aarch64 baseline, while the comment says x86_64 has a single zero-value symbol. Thus, an x86_64 static binary with one or two unexpected exports would pass, although the old dynamic path would reject them. No build option in the tree that exports symbols from these executables was identified, so this is a gap in the check, not an observed export. Run check_exported_symbols in the static path, where it already skips non-exported entries, or assert an explicit per-architecture list of expected baseline symbols.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [minor]: Python optimization disables the static ELF checks
- [suggestion]: Confirm the NSS compatibility tradeoff for static release binaries
- [minor]: Report static ELF failures through the normal mechanism