⚡️‼️ NEW - Coldcard bug may have been caused by a compiler workaround. A new technical analysis by Core-Lightning dev ddustin suggests the 2021 COLDCARD vulnerability may have started while a developer was trying to connect three layers of the firmware: the wallet’s Python code, MicroPython’s C code, and the STM32 hardware random number generator. The custom code appears to have conflicted with MicroPython’s existing implementation, likely triggering a compiler error. The evidence suggests the developer then disabled the hardware RNG by setting MICROPY_HW_ENABLE_RNG to 0, allowing the firmware to compile. That change had an unintended consequence. When users created new wallets, the firmware no longer used the hardware random number generator. Instead, it fell back to MicroPython’s much weaker Yasmarang software random number generator. The commit message left by the dev was just the word “runs.” The analysis argues this is a reminder that developers should never ship security-critical code they don’t fully understand, especially when it protects billions of dollars in Bitcoin. That speaks volumes about the professionalism and reliability of the company behind it. image

Replies (10)

Default avatar
G Force G 3 days ago
This would also be a good way to make auditable software pass static code analysis with a backdoor for the elect.
Every developer knows that if you have to brute force the compiler to compile you did bad. Not a witch hunt just appreciate the implication
db's avatar
db 3 days ago
unintended? it litteraly says "HW_ENABLE_RNG = 0" i.e false.
Such changes are never unintended. Intention was to disable the setting. Don’t let anyone think otherwise
OgFOMK ArTS's avatar
OgFOMK ArTS 3 days ago
In the military I disabled the very fast baud rate for double encrypted, frequency hopped fire missions. I told my command that the pops and cracks in our phone lines were making the non-acknowlege transmissions. I suggested we fire using a slow baud because we had many assets doing nothing. Millions of dollars of equipment and men doing nothing. My command accepted the idea and we proceed in 30 minutes to be up and firing. --- The fix was documented and we later solved the issue by improving how we connected to civilian phone lines. --- Developers work fast and they don't want to document when they are making things work. Who does? When things work endorphins flood the brain and reason takes a hike. This is why men who fear God make better decisions and hedonists get great results fast but also contribute to fratricide.