GitHub Advisoryadvisory · crates.io
GHSA-w7j2-35mf-95p7 Incorrect check on buffer length in rand_core
CRITICAL
Official page ↗
- Aliases
- CVE-2021-27378
- Ecosystem
- crates.io
- Packages
- rand_core
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-330
- Reviewed
- 2021-08-19
Affected packages
• crates.io rand_core: >= 0.6.0, < 0.6.2 → fixed in 0.6.2
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. 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.
Related
Alias · CVE (1)
- CVE-2021-27378 An issue was discovered in the rand_core crate before 0.6.2 for Rust. vulnerability
Weakness · CWE (1)
- CWE-330 Use of Insufficiently Random Values weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-27378 advisory
- https://github.com/rust-random/rand/pull/1096 web
- https://github.com/rust-random/rand package
- https://github.com/rust-random/rand/compare/0.6.0...rand_core-0.6.2#diff-f41b3dfa5ce28f3bee390d327c50621e141cf3569921f8e9ca15ccfcf25263a9R19 web
- https://github.com/rust-random/rand/compare/0.6.0...rand_core-0.6.2#diff-f41b3dfa5ce28f3bee390d327c50621e141cf3569921f8e9ca15ccfcf25263a9R28 web
- https://rustsec.org/advisories/RUSTSEC-2021-0023.html web