RUSTSEC-2021-0023

Source
https://rustsec.org/advisories/RUSTSEC-2021-0023
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0023.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2021-0023
Aliases
Published
2021-02-12T12:00:00Z
Modified
2023-11-01T04:54:54.820398Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Incorrect check on buffer length when seeding RNGs
Details

Summary: randcore::le::readu32into and readu64_into have incorrect checks on the source buffer length, allowing the destination buffer to be under-filled.

Implications: some downstream RNGs, including Hc128Rng (but not the more widely used ChaCha*Rng), allow seeding using the SeedableRng::from_seed trait-function with too short keys.

References

Affected packages

crates.io / rand_core

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.6.0
Fixed
0.6.2

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "rand_core::le::read_u32_into",
            "rand_core::le::read_u64_into"
        ],
        "arch": []
    }
}

Database specific

{
    "cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
    "informational": null,
    "categories": [
        "crypto-failure"
    ]
}