GHSA-74R5-G7VC-J2V2
Vulnerability from github – Published: 2024-07-08 18:39 – Updated: 2024-07-09 19:45
VLAI?
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 ?
6.2 (Medium)
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "zerovec-derive"
},
"ranges": [
{
"events": [
{
"introduced": "0.10.0"
},
{
"fixed": "0.10.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "crates.io",
"name": "zerovec-derive"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.9.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-120"
],
"github_reviewed": true,
"github_reviewed_at": "2024-07-08T18:39:18Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "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.3` use `#[repr(C, packed)]`, which guarantees field order.\n",
"id": "GHSA-74r5-g7vc-j2v2",
"modified": "2024-07-09T19:45:09Z",
"published": "2024-07-08T18:39:18Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/unicode-org/icu4x/issues/5196#issuecomment-2214711069"
},
{
"type": "WEB",
"url": "https://github.com/rustsec/advisory-db/pull/2007"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2024-0346.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "zerovec-derive incorrectly uses `#[repr(packed)]`"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…