RUSTSEC-2021-0023

    Dashboard / Vulnerabilities / RUSTSEC-2021-0023

    RUSTSEC-2021-0023

    Published: 12 Feb 2021Last Modified: 8 Nov 2023

    Summary: Incorrect check on buffer length when seeding RNGs

    Details: Summary: rand_core::le::read_u32_into and read_u64_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.

    Affected packages

    Package

    Name: rand_core

    Purl: pkg:cargo/rand_core

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0.6.0
    Fixed -0.6.2

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    RUSTSEC-2021-0023 | CVE-DB