Advisory

RUSTSEC-2020-0089

Also known as: CVE-2020-35926, GHSA-m9m5-cg5h-r582

Summary

nanorand 0.5.0 - RNGs failed to generate properly for non-64-bit numbers

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: CVSS v3 score 5.1, vector CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Dates

Published
2020-12-09 12:00 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

nanorand

crates.io · All systems

Affected

  • introduced 0.0.0-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: RustSec Advisory Database · CC0-1.0

Sources & licences