ADVISORIES

GitHub Advisory Database

GHSA-2q89-485c-9j2x

Improper random reading in CIRCL

Details

Impact

When sampling randomness for a shared secret, the implementation of Kyber and FrodoKEM, did not check whether crypto/rand.Read() returns an error. In rare deployment cases (error thrown by the Read() function), this could lead to a predictable shared secret.

The tkn20 and blindrsa components did not check whether enough randomness was returned from the user provided randomness source. Typically the user provides crypto/rand.Reader, which in the vast majority of cases will always return the right number random bytes. In the cases where it does not, or the user provides a source that does not, the blinding for blindrsa is weak and integrity of the plaintext is not ensured in tkn20.

Patches

The fix was introduced in CIRCL v. 1.3.3

Affected packages

EcosystemPackageAffected versions
Gogithub.com/cloudflare/circl
All versions before 1.3.3 (fixed in 1.3.3)

References