2 minor findings · 7 suggestions
Earlier concerns neither republished nor resolved: 3 suggestions. See the Run archive for their assessments.
Findings
[minor] · Static release links lose fatal linker warnings
The new static flag set replaces HOST_LDFLAGS, so linker warnings no longer fail the x86_64 and AArch64 non-GUI release builds.
Location: contrib/guix/libexec/build_linux.sh:48 (head).
Details and suggested fix
The explicit -DCMAKE_EXE_LINKER_FLAGS=... replaces the cache value initialized from LDFLAGS, so leaving -Wl,--fatal-warnings in the environment does not preserve it. The CMake warning-error probe does not apply it to final links either. Keep -Wl,--fatal-warnings in the static case to retain the existing release-build gate, including for glibc static-link portability diagnostics. If a particular unavoidable warning motivated its removal, document and handle that warning specifically rather than accepting all linker warnings.
[minor] · Existing CFLAGS and CPPFLAGS are joined onto -g
Existing CFLAGS or CPPFLAGS values become malformed flags, although no current build phase setting those variables before remapping was identified.
Location: contrib/guix/toolchains.scm:348 (head).
Details and suggested fix
The expression (string-append "-O2 -g" (or (getenv var) "") mapping) separates the generated mappings but not the preserved environment value. For example, CFLAGS=-O2 produces -O2 -g-O2 ..., while CPPFLAGS=-DX produces -O2 -g-DX .... These malformed debug options can fail glibc configuration or compilation. Add a trailing space to the preset string, such as "-O2 -g ", before appending the existing value.
Optional improvements
[suggestion] · The portability exception omits bitcoin-gui
bitcoin-gui remains dynamically linked against glibc, but the release note exempts only bitcoin-qt from the static portability claim.
Location: doc/release-notes-25573.md:5 (head).
Details and suggested fix
build_linux_gui.sh builds and installs both bitcoin-gui and bitcoin-qt with a dynamic interpreter, using the unchanged glibc 2.31 GUI toolchain. In particular, bitcoin -m gui selects bitcoin-gui, so that command does not gain the advertised compatibility with non-glibc systems. Name both GUI executables as exceptions, or describe the change as applying to non-GUI executables. Scope the dynamic NSS-module restriction to the newly static binaries as well.
[suggestion] · Shipped runtime requirements still require host glibc everywhere
Linux archives will ship an INSTALL.md that requires glibc 2.31 even for the newly static executables, contradicting their advertised portability.
Location: doc/release-notes-25573.md:6 (head).
Details and suggested fix
package.sh copies doc/INSTALL_linux.md into every Linux archive as INSTALL.md. Its unconditional glibc 2.31 requirement, also present in doc/dependencies.md, now excludes systems that the static binaries are intended to support. Update both documents to distinguish the x86_64 and AArch64 static non-GUI executables from both GUI executables and the dynamically linked architectures. State that the static executables need no host glibc while retaining their configured Linux 3.17 minimum.
[suggestion] · The AArch64 hardening claim lacks an ELF artifact check
No current BTI/PAC failure is identified, but release checks do not verify the AArch64 feature note supporting the PR's claim to resolve #19075.
Location: contrib/guix/linux_static.scm:7 (head).
Details and suggested fix
security-check.py assigns ELF ARM64 only BASE_ELF. CMake probes -mbranch-protection=standard with SKIP_LINK, so accepting the compiler flag does not establish the final feature note. An input lacking BTI marking can cause the linker to drop that property without failing these checks. Add an ELF ARM64 check requiring the BTI and PAC bits in GNU_PROPERTY_AARCH64_FEATURE_1_AND, with a negative fixture missing a required bit. This validates artifact marking; runtime enforcement on supported hardware remains a separate question.
[suggestion] · Static artifact checks omit embedded /gnu/store/ paths
No current leak is identified, but the static checks do not verify that the PR's targeted substitutions removed Guix store paths from compiled-in runtime strings.
Location: contrib/guix/symbol-check.py:302 (head).
Details and suggested fix
The patches replace several libc runtime paths, and use-portable-shell separately rewrites SHELL_PATH in system.c. ELF dependency, interpreter and RUNPATH checks cannot detect a missed compiled-in path. Reproducible builds can also agree on such a path even though it is absent on users' systems. For example, a leaked shell path would affect runCommand, which calls libc system(). Add a static-artifact check rejecting /gnu/store/ in runtime strings or read-only data so the portability transformations are validated in the produced executables.
[suggestion] · Static-check failures bypass named diagnostics
Static violations currently fail packaging but abort without identifying the file or checking later binaries; Python optimization, which package.sh does not request, disables the checks altogether.
Location: contrib/guix/symbol-check.py:355 (head).
Details and suggested fix
The static branch calls check_ELF_STATIC(binary) without consuming its return value. Its assertions raise a traceback rather than populating failed, so a violation stops the loop before the usual <file>: failed <CHECK> diagnostic. With -O or PYTHONOPTIMIZE, those assertions disappear and the helper simply returns True. Express the static requirements as named boolean checks and run them through the existing failure-reporting loop, including explicit boolean validation in the helpers used by that path.
[suggestion] · Static mode no longer validates exported symbols
A small unintended export set can fit under the static dynamic-symbol limit and bypass EXPORTED_SYMBOLS; no such export has been identified in current artifacts.
Location: contrib/guix/symbol-check.py:303 (head).
Details and suggested fix
check_ELF_STATIC permits up to three dynamic symbols and forbids imports, but it never checks whether those symbols are exported. The static branch also skips check_exported_symbols, which rejects exports outside IGNORE_EXPORTS for other ELF files. Selective exports can therefore pass while a broad export mistake would exceed the count limit. Run the existing exported-symbol check in static mode as well, preserving any explicitly required architecture-specific allowances rather than using the total count as a proxy.
[suggestion] · The libc-addition commit leaves the NSS policy unexplained
The behavior-changing NSS patch arrives with the libc version addition, but its commit rationale discusses only store paths and leaves the compatibility tradeoff to the final release note.
Location: contrib/guix/patches/glibc-nss-nodlopen.patch:16 at 3364342bbcfe (commit) (commit).
Details and suggested fix
3364342bbcfea8d5e71dd5ffed221858ad9038c6 adds and registers glibc-nss-nodlopen.patch, replacing __libc_dlopen with NULL and removing the NSS static-link warning. The loss of dynamic NSS services such as mDNS, LDAP and SSSD is explained only in release-note commit 8906771df72f598621bf5a0120be3c8b8188c5e3. Add that rationale and compatibility cost to the introducing commit's message.
Alternatively, move the NSS patch and its patch-list entry together into a separate commit after the libc addition and before d574dd5ad9f2f83a9876c37a8627c1564c7f6f84, which first activates static glibc on x86_64. 65df9f0aa168cffa09e6f611effb3e183c4c26bd activates it on AArch64 later. Since the manifest still selects the old libc at the addition commit, this separation keeps the policy reviewable without changing the final tree or exposing an unpatched static-build intermediate.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Confirm the NSS compatibility tradeoff for static release binaries
- [suggestion]: Static binaries embed a pinned glibc resolver without a stated update process (earlier report)
- [suggestion]: Static FORTIFY check cannot distinguish application calls from libc code (earlier report)
Background
Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.
Documented decisions
The glibc baseline is a release-deployment contract: raising it can exclude existing distributions even when building from source remains possible.
The earlier glibc 2.27 consolidation explicitly identified distributions that would lose binary compatibility. At the pinned base, the same contract is expressed through a glibc 2.31 symbol ceiling, distribution-lifecycle comments, allowed libraries, and architecture-specific interpreter paths. Static linkage changes the mechanism for meeting this contract; it does not make compatibility evidence unnecessary.
The historical motivation for a static daemon was to eliminate variability and possible bugs from installed host libraries, remove glibc compatibility workarounds, and simplify deployment. GUI integration was deliberately treated as a different constraint.
The head applies static PIE to x86_64 and AArch64 non-GUI builds while retaining dynamic GUI exceptions. This distinction follows earlier discussion that desktop integration, fonts, X-related dependencies, and FreeType make fully static Qt substantially harder than a static daemon and utilities.
Source 1 · Source 2 · Source 3
The minimum Linux kernel version is an independent compatibility requirement, and the glibc configuration and ELF ABI-note check were intentionally aligned with that policy.
The historical kernel-baseline change explicitly says that --enable-kernel=3.17.0 should make the binary and symbol checker reflect the documented minimum. The pinned tables require Linux 3.17.0 for x86_64, ARM, AArch64, and both PPC64 endiannesses, with 4.15.0 for RISC-V. The new static check retains the ABI-note check, and the new libc configuration retains the 3.17.0 setting.
AArch64 hardening depends on more than accepting compiler flags: PAC and BTI address control-flow attacks, require system support, and BTI requires compatible linked inputs.
The earlier proposal describes PAC as protection against return-oriented programming and BTI as restricting branch targets. It states that all linked inputs must be BTI-enabled, identifies startup objects as a possible obstacle, and records a glibc bump as a blocker. Historical verification included inspecting GNU property notes and requesting runtime testing on BTI-capable hardware. These are relevant constraints when the release starts embedding a newer libc rather than relying on the host libc.
Source 1 · Source 2 · Source 3 · Source 4 · Source 5
The FORTIFY artifact check was introduced to detect some use of fortified functions, not to certify complete source coverage. Separately, successful acceptance of _FORTIFY_SOURCE=3 does not establish that level 3 is effective.
The original check's author explicitly described its scope as any fortified function calls in the binary. Another historical change explains that level 3 requires __builtin_dynamic_object_size and can fall back to level 2. The head's move from imported symbols to all symbols accommodates static definitions, but its result must still be interpreted as limited artifact evidence rather than proof of the effective fortification level or coverage of all application code.
Source 1 · Source 2 · Source 3 · Source 4
Ralph's inferences
Preventing NSS module loading trades configured resolver-service integration for independence from host executable code and host-libc compatibility. It is stronger than merely linking libc statically.
The retained upstream comment in the NSS patch says that statically linked programs otherwise require shared NSS modules matching the libc used to build them; the patch replaces the module-loading call with a failed load. Combined with the historical goal of independence from installed libraries, this explains the portability incentive for disabling loading rather than preserving arbitrary configured services. Avoiding that path also narrows runtime code-loading exposure, but an independent historical security justification for this exact policy was not retrieved. This patch alone does not establish that every other libc dlopen path is disabled.
A portable static executable is not necessarily filesystem-hermetic: intentional host runtime paths must be distinguished from build-store leakage.
The head explicitly restores /bin/sh and substitutes conventional locations for locale data, timezone data, gconv data/modules, getconf helpers, and loader directories: /usr/share/locale, /usr/lib/locale, /usr/share/zoneinfo, /usr/lib/gconv, /usr/libexec/getconf, and /usr/lib. These are configured paths, not evidence that every path is exercised by Bitcoin Core. The older prefix-map patch explains why Guix hashes must disappear for cross-build-host reproducibility. Resolver configuration is another runtime concern, but the exact retained files and fallback behavior of the new upstream libc were not independently inspected.
Static/ABI validation and hardening validation answer different questions; preserving the release contract requires evidence from both, plus runtime compatibility evidence.
The new static check examines dynamic-symbol counts, imports, library dependencies, the interpreter, ABI note, and runtime search paths. The separate security checker still tests PIE/ASLR eligibility, non-executable stack, RELRO with immediate binding, stack canaries, section permissions, and x86_64 control-flow instrumentation. Absence of an ELF interpreter or dependencies does not by itself demonstrate those protections, absence of runtime module loading, or actual execution on the minimum kernel. Architecture-specific symbol counts likewise describe artifact structure rather than proving equivalent runtime behavior across architectures.
For static artifacts, a fortified-function definition and evidence that application code uses fortification are distinct strengths of evidence.
The head searches all symbols, including definitions supplied by embedded libc, and excludes the stack-protector marker from its FORTIFY count. That supports detecting the presence of fortified routines. Establishing actual fortification use requires evidence of relevant call sites or equivalent generated-code behavior; establishing level 3 additionally requires effective compiler/libc support. These distinctions follow the historical check's limited purpose and do not establish a defect in this change.
Source 1 · Source 2 · Source 3
Unresolved disagreements
The FORTIFY history contains competing expectations about what a passing artifact check should certify: some fortified calls, or assurance that the application's fortification configuration has not been lost.
One participant demonstrated a passing check after removing the application's fortification build logic and called that a false positive; the author replied that the binary still contained fortified calls and therefore met the check's intended scope. The inspected record establishes that narrow scope, but does not resolve the broader assurance request. Static libc makes the distinction especially relevant because library-provided routines and application instrumentation coexist in the same artifact.