RUSTSEC-2024-0346
MEDIUM 6.2CVSS 3.1zerovec-derive incorrectly uses `#[repr(packed)]`
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.3 use #[repr(C, packed)], which guarantees field order.
- Published
- 1 Jul 2024
- Last modified
- 10 Sep 2026
- Weakness
- CWE-120
- Also known as
- GHSA-74r5-g7vc-j2v2
- Sources
- OSV GHSA-74r5-g7vc-j2v2JSONOSVJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | 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 | |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | zerovec-derive | >= 0.10.0, < 0.10.3 | 0.10.3 |
| OSV | crates.io | zerovec-derive | < 0.9.7 | 0.9.7 |
| OSV | crates.io | zerovec-derive | >= 0.0.0-0, < 0.9.7; >= 0.10.0, < 0.10.3 | 0.9.7, 0.10.3 |
References
- https://github.com/unicode-org/icu4x/issues/5196#issuecomment-2214711069 · WEB
- https://github.com/rustsec/advisory-db/pull/2007 · WEB
- https://rustsec.org/advisories/RUSTSEC-2024-0346.html · WEB, ADVISORY
- https://crates.io/crates/zerovec-derive · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 1 Jul 2024)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 8 Jul 2024)