In “rare circumstances”, the Android Bitcoin wallet Blockchain could prove a catastrophic failure for users, so its authors have rushed out an update.
According to the app's advisory, the bug affected a mere “handful” of users, with one report noting that the bug ended up with one lucky Bitcoin account holder being sent 34 bitcoins – around US$8,000 worth.
The problem is that Blockchain's authors didn't notice when their random number generator of choice, random.org, switched over to HTTPS for better security, and started returning a 301 error (moved permanently) to apps asking for a random number.
Instead of giving users an error, Blockchain used the number 301 to generate the private key corresponding to address 1Bn9ReEocMG1WEW1qYjuDrdFzEFFDCq43F (the lucky recipient of the stray Bitcoin).
A second programming error meant that the 256-bit number from Random.org was the sole input to Blockchain's randomness, rather than being XORd for added entropy.
The programming blunders were dissected on Reddit, with one user offering the following remarks on the situation:
“This has found its way to infosec Twitter and we're all kinda sitting around gawking at it in sheer disbelief that someone would seed for Bitcoin from random.org (problematic), over plaintext (deal breaker), and then not even trap results other than 200 OK (mind blower). An incredible cascade of bad decisions.”
Thankfully only people running Blockchain on Android 4.1 or older that would have been affected. ®