Advisory

GHSA-m9m5-cg5h-r582

Also known as: CVE-2020-35926, RUSTSEC-2020-0089

Summary

Improper random number generation in nanorand

Details

In versions of nanorand prior to 0.5.1, RandomGen implementations for standard unsigned integers could fail to properly generate numbers, due to using bit-shifting to truncate a 64-bit number, rather than just an as conversion. This often manifested as RNGs returning nothing but 0, including the cryptographically secure ChaCha random number generator.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2021-08-25 20:50 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

nanorand

crates.io · All systems

Affected

  • introduced 0, fixed 0.5.1 (semver)

Fixed versions

0.5.1

Fix

  • Fixed version 0.5.1
    cargo update -p nanorand --precise 0.5.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences