Advisory

RUSTSEC-2024-0346

Also known as: GHSA-74r5-g7vc-j2v2

Summary

Incorrect usage of #[repr(packed)]

Details

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.

Severity

Not rated by the source.

Dates

Published
2024-07-01 12:00 UTC
Modified
2025-10-28 06:29 UTC

Affected packages and fixes

zerovec-derive

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.9.7, introduced 0.10.0, fixed 0.10.3 (semver)

Fixed versions

0.9.7, 0.10.3

Fix

  • Fixed version 0.9.7
    cargo update -p zerovec-derive --precise 0.9.7
  • Fixed version 0.10.3
    cargo update -p zerovec-derive --precise 0.10.3

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences