GHSA-xrv3-jmcp-374j
medium
zerovec incorrectly uses `#[repr(packed)]`
- Severity
- medium CVSS:4.0 by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2024-0347
Description
The affected versions make unsafe memory accesses under the assumption that #[repr(packed)] has a guaranteed field order.
The Rust specification does not guarantee this, and https://github.com/rust-lang/rust/pull/125360 (1.80.0-beta) starts
reordering fields of #[repr(packed)] structs, leading to illegal memory accesses.
The patched versions 0.9.7 and 0.10.4 use #[repr(C, packed)], which guarantees field order.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| zerovec (crates.io) | from 0.10.0 before 0.10.4, before 0.9.7, from 0.0.0-0 before 0.9.7 | GitHub Advisory Database, RustSec Advisory Database |
All scores
| GitHub | 6.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-xrv3-jmcp-374j changed 2026-09-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2024-0347 changed 2025-10-28 | CC0-1.0 |