Advisory

GHSA-74r5-g7vc-j2v2

Also known as: RUSTSEC-2024-0346

Summary

zerovec-derive incorrectly uses #[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

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-07-08 18:39 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

zerovec-derive

crates.io · All systems

Affected

  • introduced 0.10.0, fixed 0.10.3 (semver)

Fixed versions

0.10.3

Fix

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

zerovec-derive

crates.io · All systems

Affected

  • introduced 0, fixed 0.9.7 (semver)

Fixed versions

0.9.7

Fix

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

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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences