{"id":"GHSA-xrv3-jmcp-374j","aliases":["GHSA-xrv3-jmcp-374j","RUSTSEC-2024-0347"],"related":[],"kind":"vulnerability","state":"published","title":"zerovec incorrectly uses `#[repr(packed)]`","summary":"The affected versions make unsafe memory accesses under the assumption that `#[repr(packed)]` has a guaranteed field order. \n\nThe Rust specification does not guarantee this, and https://github.com/rust-lang/rust/pull/125360 (1.80.0-beta) starts \nreordering fields of `#[repr(packed)]` structs, leading to illegal memory accesses.\n\nThe patched versions `0.9.7` and `0.10.4` use `#[repr(C, packed)]`, which guarantees field order.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"The affected versions make unsafe memory accesses under the assumption that `#[repr(packed)]` has a guaranteed field order. \n\nThe Rust specification does not guarantee this, and https://github.com/rust-lang/rust/pull/125360 (1.80.0-beta) starts \nreordering fields of `#[repr(packed)]` structs, leading to illegal memory accesses.\n\nThe patched versions `0.9.7` and `0.10.4` use `#[repr(C, packed)]`, which guarantees field order.","format":"markdown","source":"ghsa"}],"published":"2024-07-01T12:00:00.000Z","modified":"2026-09-10T03:50:17.197Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":6.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"}],"cwes":["CWE-120"],"affected":[{"ranges":[{"type":"semver","introduced":"0.10.0","status":"affected","fixed":"0.10.4"}],"ecosystem":"crates.io","package":"zerovec","purl":"pkg:cargo/zerovec","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.7"}],"ecosystem":"crates.io","package":"zerovec","purl":"pkg:cargo/zerovec","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.9.7"},{"type":"semver","introduced":"0.10.0","status":"affected","fixed":"0.10.4"}],"ecosystem":"crates.io","package":"zerovec","purl":"pkg:cargo/zerovec","source":"rustsec"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0347.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/zerovec","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xrv3-jmcp-374j","url":"https://github.com/advisories/GHSA-xrv3-jmcp-374j","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:17.197Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2024-0347","url":"https://rustsec.org/advisories/RUSTSEC-2024-0347.html","licence":"CC0-1.0","modified":"2025-10-28T06:29:27.173Z"}],"updatedAt":"2026-11-25T22:56:43.197Z"}