GHSA-m9m5-cg5h-r582

Suggest an improvement
Source
https://github.com/advisories/GHSA-m9m5-cg5h-r582
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-m9m5-cg5h-r582/GHSA-m9m5-cg5h-r582.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m9m5-cg5h-r582
Aliases
Published
2021-08-25T20:50:24Z
Modified
2023-11-08T04:03:39.769670Z
Severity
  • 5.1 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N CVSS Calculator
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.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-338"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2021-08-19T18:55:41Z"
}
References

Affected packages

crates.io / nanorand

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.5.1