← Zurück zum Community-Hub

Coinkite highlights on fundamental challenge in open-source embedded software

Von Hype Mak4.8.2026
👁️ 11 Aufrufe
code audits (both human and AI-assisted) almost exclusively focus on application-level logic rather than cross-submodule build behavior. ​ 1. Why the Flaw Evaded Code Reviews ​The vulnerability that led to the $70M Coldcard seed generation flaw was not a flaw in Bitcoin implementation, standard math, or cryptographic algorithms. ​The Integration Blindspot: The bug occurred at the linker/build boundary between two separate submodules—the core firmware stack and an underlying MicroPython/STM32 hardware driver module. ​Identical Function Signatures: Both submodules defined an rng_get() function. Auditors and static analysis tools saw the board-specific Hardware TRNG implementation in the codebase and assumed it was the active function in the compiled binary. ​The Linker Override: During compilation, the build system silently linked the general MicroPython software PRNG driver instead of the hardware TRNG driver, dropping entropy down to a predictable range without throwing a build error or altering the high-level application logic. ​ 2. Why AI Code Reviewers Failed to Detect It ​Coinkite’s testing against frontier models (including Kimi K3, Claude Fable, and Codex 5.6) highlights current architectural limitations in AI-assisted code auditing: ​Context Window vs. Compilation Graph: LLMs analyze source code locally file-by-file or function-by-function. They generally do not simulate macro-level compilation trees, C linker behaviors, or Makefile symbol resolution rules across disparate submodules. ​Assumption of Intended Behavior: When an AI model inspects a clean, mathematically correct TRNG function in rng.c, it evaluates whether the math is sound. It rarely cross-checks whether the compiler's build script actually links that specific object file into the final binary artifact. ​The "Shadowing" Blindspot: Symbol shadowing across C submodules is an operational build-system bug, not a syntax or algorithmic error. ​ 3. Key Takeaways for Bitcoin & Embedded Developers ​Coinkite’s warning emphasizes several structural changes needed in security-critical firmware development: ​Audit the Build Graph, Not Just the Code: Security audits for hardware wallets and node implementations must explicitly verify symbol linking, build scripts (Makefiles/CMake), and binary object maps (.map files) to ensure the compiled output matches the intended function paths. ​Eliminate Duplicate Function Symbols: Avoid shared or generic function signatures (like rng_get()) across external submodules to prevent silent linker overrides. ​Do Not Rely Solely on AI Audits: While LLMs are effective at spotting unit-level logic flaws and standard zero-days, they remain blind to build-system configurations and cross-module boundary interactions.