rustsec-2023-0087
Vulnerability from osv_rustsec
Published
2023-10-14 12:00
Modified
2025-10-28 06:02
Summary
`MaybeUninit` misuse in `simd-json-derive`
Details
An invalid use of MaybeUninit::uninit().assume_init() in simd-json-derive's derive macro can cause undefined behavior. The original code used MaybeUninit to avoid initialisation of the struct and then set the fields using ptr::write. The undefined behavior triggered by this misuse of MaybeUninit can lead to invlaid memory access and panics in binaries compiled in release mode (aka simd-json-derive prior to version 0.12 has UB and optimizes into some nonsense)
The 0.12.0 removes this section of code, avoiding the use of MaybeUninit alltogether.
{
"affected": [
{
"database_specific": {
"categories": [],
"cvss": null,
"informational": "unsound"
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "simd-json-derive",
"purl": "pkg:cargo/simd-json-derive"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0-0"
},
{
"fixed": "0.12.0"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [
"GHSA-pqpw-89w5-82v5"
],
"database_specific": {
"license": "CC0-1.0"
},
"details": "An invalid use of `MaybeUninit::uninit().assume_init()` in `simd-json-derive`\u0027s derive macro can cause undefined behavior. The original code used `MaybeUninit` to avoid initialisation of the struct and then set the fields using `ptr::write`. The undefined behavior triggered by this misuse of `MaybeUninit` can lead to invlaid memory access and panics in binaries compiled in release mode (aka simd-json-derive prior to version 0.12 has UB and optimizes into some nonsense)\n\nThe `0.12.0` removes this section of code, avoiding the use of MaybeUninit alltogether.",
"id": "RUSTSEC-2023-0087",
"modified": "2025-10-28T06:02:18Z",
"published": "2023-10-14T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/simd-json-derive"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2023-0087.html"
},
{
"type": "REPORT",
"url": "https://github.com/simd-lite/simd-json-derive/issues/67"
}
],
"related": [],
"severity": [],
"summary": "`MaybeUninit` misuse in `simd-json-derive`"
}
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…