GHSA-pqpw-89w5-82v5 json
`simd-json-derive` vulnerable to `MaybeUninit` misuse
published 3y ago modified last yr. also RUSTSEC-2023-0087
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
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 version `0.12.0` removes this section of code, avoiding the use of MaybeUninit alltogether.
Patch / fix
- crates.io simd-json-derive 0.12.0
Is GHSA-pqpw-89w5-82v5 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | simd-json-derive | <0.12.0 >=0.0.0-0, <0.12.0 |
0.12.0 |
References
-
github.com
/simd-lite/simd-json-derive/issues/67
web, report
-
github.com
/simd-lite/simd-json-derive
package
-
rustsec.org
/advisories/RUSTSEC-2023-0087.html
web, advisory
-
crates.io
/crates/simd-json-derive
package
Sources
- GitHub Advisory GHSA-pqpw-89w5-82v5
- OSV RUSTSEC-2023-0087
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.