Skip to content
OpenAdvisories
Critical · 9.8 CVE-2020-25576 EUVD-2021-1804GHSA-mmc9-pwm7-qj5wRUSTSEC-2019-0035

Unaligned memory access in rand_core

Published Sep 14, 2020 · Updated Aug 4, 2024 · Assigned by mitre

Description

An issue was discovered in the rand_core crate before 0.4.2 for Rust. Casting of byte slices to integer slices mishandles alignment constraints.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 rust-rand-core 0.5.0-1 —
Debian 13 rust-rand-core 0.5.0-1 —
Debian 12 rust-rand-core 0.5.0-1 —
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS rust-rand-core-0.2 +1 No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 kata-containers 3.2.0.azl2-3 —

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io rand_core >= 0.4.0, < 0.4.2 0.4.2 GHSA-mmc9-pwm7-qj5w
crates.io rand_core < 0.3.1 0.3.1 GHSA-mmc9-pwm7-qj5w
crates.io rand_core >= 0.0.0-0, < 0.3.1 · >= 0.4.0-0, < 0.4.2 0.3.1, 0.4.2 RUSTSEC-2019-0035

References