NetSight
medium6.2No CVE yet

GHSA-xrv3-jmcp-374j

zerovec incorrectly uses `#[repr(packed)]`

Impact

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.

An attacker can exploit this with local access to the system, without logging in, without any action by a user. If it succeeds: high risk of data or systems being changed.

Affected packages

EcosystemPackageAffectedFixed in
rustzerovec>= 0.10.0, < 0.10.40.10.4
rustzerovec< 0.9.70.9.7

Weakness classification

References