Google has released an upgrade to Go 1.5.3 to fix a security issue with the math/big package for implementing multiprecision arithmetic. Go programs must be recompiled with this version to receive the fix.
"This issue can affect RSA computations in crypto/rsa, which is used by crypto/tls," a golang-dev post in Google Groups says. "TLS servers on 32-bit systems could plausibly leak their RSA private key due to this issue. Other protocol implementations that create many RSA signatures could also be impacted in the same way." Incorrect results in one part of the RSA Chinese Remainder computation can lead to the wrong outcome down the line such that it leaks a prime number.
RSA binding should prevent an attacker from crafting inputs that trigger the bug, but on 32-bit systems the bug can occur at random around one in 2^26 times. Collecting around 64 million signatures of known data from an affected server should be enough to extract the private key.
On 64-bit systems, the frequency of this bug is so low it would be difficult to exploit, the post said. "Nonetheless, everyone is strongly encouraged to upgrade." Downloads are currently available.
Go 1.6 is slated to include a change to double-check the RSA computation. That release is expected early this year.
This story, "Google's Go upgrade fixes bug that could leak RSA private key" was originally published by InfoWorld.