What changed, and why it matters
This commit removes a temporary build setting that forced the Bitcoin Core kernel library to expose all of its internal symbols. Now that the library's public API has been defined, the project can rely on normal symbol-hiding rules when users build with reduced exports. This is a hardening and cleanup change, not a fix for an active security bug.
No immediate action required. Treat as routine hardening/cleanup. Users building with -DREDUCE_EXPORTS=ON will now benefit from reduced symbol exports for the kernel library. Monitor CI and downstream builds for any linkage issues.
Security signals we found
reduction of exported symbol attack surface
removal of a temporary visibility workaround
build-system hardening
Evidence from the diff
The change deletes a CMake override (CXX_VISIBILITY_PRESET default) for the bitcoinkernel target. Previously, this override forced default symbol visibility even when -DREDUCE_EXPORTS=ON was used, ensuring all symbols were exported while the kernel API was still being defined. The commit message states the API is now defined, so the override is removed, allowing reduced exports to take effect. This limits the attack surface by hiding internal symbols but does not patch a specific vulnerability.
Changed components
src/kernel/CMakeLists.txtbitcoinkernel library build configurationInspect captured patch +0 / −10
diff --git a/src/kernel/CMakeLists.txt b/src/kernel/CMakeLists.txt
index 7b2f3c7d..1db7ead0 100644
--- a/src/kernel/CMakeLists.txt
+++ b/src/kernel/CMakeLists.txt
@@ -96,16 +96,6 @@ target_link_libraries(bitcoinkernel
target_include_directories(bitcoinkernel PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/leveldb/include>)
-# libbitcoinkernel requires default symbol visibility, explicitly
-# specify that here so that things still work even when user
-# configures with -DREDUCE_EXPORTS=ON
-#
-# Note this is a quick hack that will be removed as we
-# incrementally define what to export from the library.
-set_target_properties(bitcoinkernel PROPERTIES
- CXX_VISIBILITY_PRESET default
-)
-
# Add a convenience libbitcoinkernel target as a synonym for bitcoinkernel.
add_custom_target(libbitcoinkernel)
add_dependencies(libbitcoinkernel bitcoinkernel)
Why this scored 17/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.