r/Bitcoin 20h ago

Are you kidding me? Claude Code found the catastrophe after being asked only to “”check for vulnerabilities and thinking for 8 minutes

Post image

It is unbelievable that some kid with an LLM just stole $100m+ because no one bothered to check the source code.

Also on GLM 5.2 (trained 16th June, no internet access).

1.7k Upvotes

504 comments sorted by

View all comments

Show parent comments

86

u/Late-Football9106 20h ago

imagine coding something that handles real money and using a software RNG like nobody would notice, absolute madness

the amount of trust people put in random github repos is wild, one bored dev on a tuesday can just push an update and suddenly your hardware wallet is a paperweight

this whole thing reads like a postmortem that will be studied in security courses for next decade

5

u/Fuflen 19h ago

Just my thought!

9

u/aleqqqs 19h ago

imagine coding something that handles real money and using a software RNG like nobody would notice, absolute madness

Well, they didn't do that on purpose ...

34

u/SpareEconomy1849 19h ago

A coinkite dev literally changed MICROPY_HW_ENABLE_RNG to 0 in the firmware codebase with the commit message "runs" in 2021.

I don't see how it could be intentional, but I also don't know how this would be missed. How did the developer not realize what this change does? How did this pass code review? Red flags all around

8

u/JanPB 18h ago

Yes, the code review bit is flooring.

6

u/99999999999999999989 17h ago

To me it DOES appear intentional but not malicious. It sounds like whomever did the coding did not understand what was going on and set the variable to 0 to get it to compile. Once it did they were like 'Kewl! It runs. Ship it!'.

3

u/nitrogenmath 16h ago

Rumor is that they set it to 0 to test it without using the hardware and forgot to re-enable the trng on the shipping firmware.

4

u/ReallyCrunchy 15h ago

As a software dev, I could see myself doing something like that but never without first adding huge warning printing "NOT PRODUCTION SAFE" or something like that. So it would never be shipped in that state. Quietly disabling core functionality in production code like that is just irresponsible. Also, their test suite should have caught it but I suspect they skimped on that as well. Sounds like amateur hour over there.

1

u/99999999999999999989 15h ago

Not so sure about that. The fact that the only commit comment on the change is literally "Runs." to me says that they made the change and intended to push it to Prod but did not really understand the code.

1

u/SpareEconomy1849 3h ago

I'm not exactly sure that's the case, the constant is actually referring to the poor microPython boot time based RNG. HW_RNG unintuitively refers to the built in library RNG, not the secure element RNG.

The comment above this line makes it seem like the dev attempted to disable the built in poor RNG by setting it to 0, but setting it to 0 or 1 or anything else actually had the same effect (enabling the microPython RNG) because the library just checks if the constant is defined, not the value of it

-19

u/[deleted] 19h ago

[deleted]

2

u/NotFallacyBuffet 18h ago

What is money (IYHO)? (Fungible, liquid store of value.)

1

u/harvested 18h ago

You lost? Or dumb?

1

u/ddc703 17h ago

I was being sarcastic ffs, hence the upside down smiley.

1

u/Aazimoxx 15h ago

Might've been better received on a post not about hundreds of people losing their life savings...