Skip to content

CVE-2021-27378 Incorrect check on buffer length in rand_core

CriticalCVSS 9.8 EPSS 1.3%
Published
Updated
Exploit status
No public exploit known
Technology
UbuntuDebian

Description

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.

Upgrade path

8 packages: 2 fixed, 6 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/rust-rand-core(Ubuntu 20.04) = 0.3.0-1; = 0.5.1-1; All versions No fix listed No fix yet
ubuntu/rust-rand-core(Ubuntu 22.04) = 0.5.1-1; = 0.6.3-2; All versions No fix listed No fix yet
ubuntu/rust-rand-core(Ubuntu 24.04) = 0.6.3-2; = 0.6.4-1; All versions No fix listed No fix yet
ubuntu/rust-rand-core(Ubuntu 25.10) = 0.6.4-2; All versions No fix listed No fix yet
ubuntu/rust-rand-core(Ubuntu 26.04) = 0.6.4-2; All versions No fix listed No fix yet
ubuntu/rust-rand-core(Ubuntu 26.10) = 0.6.4-2; = 0.10.0-2; All versions No fix listed No fix yet
crates.io rand_core(crates.io) >= 0.6.0, < 0.6.2 0.6.2 Fixed
rand core project rand core >= 0.6.0, < 0.6.2 0.6.2 Fixed

Affected products

ProductAffected versionsFixed in
crates.io rand_core(crates.io) >= 0.6.0, < 0.6.2 0.6.2
ubuntu/rust-rand-core(Ubuntu:22.04) All versions No fix listed
rand core project rand core >= 0.6.0, < 0.6.2 0.6.2
ubuntu/rust-rand-core(Ubuntu:24.04) All versions No fix listed
ubuntu/rust-rand-core(Ubuntu:26.04) All versions No fix listed
ubuntu/rust-rand-core(Ubuntu:26.10) All versions No fix listed
ubuntu/rust-rand-core(Ubuntu:20.04) All versions No fix listed
ubuntu/rust-rand-core(Ubuntu:20.04) = 0.3.0-1 No fix listed
ubuntu/rust-rand-core(Ubuntu:20.04) = 0.5.1-1 No fix listed
ubuntu/rust-rand-core(Ubuntu:22.04) = 0.5.1-1 No fix listed
ubuntu/rust-rand-core(Ubuntu:22.04) = 0.6.3-2 No fix listed
ubuntu/rust-rand-core(Ubuntu:24.04) = 0.6.3-2 No fix listed
ubuntu/rust-rand-core(Ubuntu:24.04) = 0.6.4-1 No fix listed
ubuntu/rust-rand-core(Ubuntu:25.10) All versions No fix listed
ubuntu/rust-rand-core(Ubuntu:25.10) = 0.6.4-2 No fix listed
ubuntu/rust-rand-core(Ubuntu:26.10) = 0.6.4-2 No fix listed
ubuntu/rust-rand-core(Ubuntu:26.10) = 0.10.0-2 No fix listed
ubuntu/rust-rand-core(Ubuntu:26.04) = 0.6.4-2 No fix listed

References