Advisory

GHSA-w7j2-35mf-95p7

Also known as: CVE-2021-27378, RUSTSEC-2021-0023

Summary

Incorrect check on buffer length in rand_core

Details

An issue was discovered in the rand_core crate before 0.6.2 for Rust. Because read_u32_into and read_u64_into mishandle certain buffer-length checks, a random number generator may be seeded with too little data. The vulnerability was introduced in v0.6.0. The advisory doesn't apply to earlier minor version numbers.

Because read_u32_into and read_u64_into mishandle certain buffer-length checks, a random number generator may be seeded with too little data.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2021-08-25 20:52 UTC
Modified
2023-11-08 04:05 UTC

Affected packages and fixes

rand_core

crates.io · All systems

Affected

  • introduced 0.6.0, fixed 0.6.2 (semver)

Fixed versions

0.6.2

Fix

  • Fixed version 0.6.2
    cargo update -p rand_core --precise 0.6.2

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