Audit report AR-36
Reported privately in an independent security review, 2026-09-18.
- Report date
- 2026-09-18
- Kind
- Build
- Status on master
- Present
- Proposed issue state
- Open
Summary
With tests enabled, Bitcoin Core's cmake/libmultiprocess.cmake sets properties on the libmultiprocess mptest target unconditionally, but the bundled libmultiprocess only creates mptest when Cap'n Proto's optional kj-test component is installed. Building against a Cap'n Proto installation without that component therefore fails at configure time. The report is correct. Depends builds are not affected, and there is no runtime effect. One-line build fix, mergeable.
The report
The Bitcoin Core integration should only change the bundled libmultiprocess test target when that target exists. The bundled test directory creates mptest only when CapnProto::kj-test is available, but the integration helper calls set_target_properties(mptest ...) whenever Bitcoin Core tests are enabled, so CMake stops with a missing-target error for an otherwise supported arrangement of optional dependencies.
The trigger needs tests enabled and a Cap'n Proto package that provides the runtime libraries but not the optional test library. Configuration fails before anything is built. Default depends builds are not affected, because their Cap'n Proto package includes the test component. The report calls it a low-severity build compatibility bug with no runtime or network effect.
It gives no automated test; the failure is visible directly when configuring against such a Cap'n Proto installation.
Proposed change
Guard the property update on the target existing:
- if(BUILD_TESTS)
+ if(BUILD_TESTS AND TARGET mptest)
# Add tests to "all" target so ctest can run them
set_target_properties(mptest PROPERTIES EXCLUDE_FROM_ALL OFF)
endif()
mptest stays in the default build whenever it exists.
Assessment
Present on Bitcoin Core master: the block is guarded only by if(BUILD_TESTS), while src/ipc/libmultiprocess/test/CMakeLists.txt creates mptest only if(BUILD_TESTING AND TARGET CapnProto::kj-test). The fix is correct. No runtime or IPC behaviour is involved; outside the survey's stability scope.
Status
Present on master. Next step: a one-line Bitcoin Core PR. No public PR yet.
Reported privately in an independent security review on 2026-09-18.