GHSA-xrv3-jmcp-374j
JSON

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 packageVersionsReported by
zerovec (crates.io)from 0.10.0 before 0.10.4, before 0.9.7, from 0.0.0-0 before 0.9.7GitHub Advisory Database, RustSec Advisory Database

All scores

GitHub6.2medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
GitHubmedium CVSS:4.0CVSS: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

SourceRecordLicence
GitHub Advisory DatabaseGHSA-xrv3-jmcp-374j changed 2026-09-10CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2024-0347 changed 2025-10-28CC0-1.0