Advisory

RUSTSEC-2023-0087

Also known as: GHSA-pqpw-89w5-82v5

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.

Severity

Not rated by the source.

Dates

Published
2023-10-14 12:00 UTC
Modified
2025-10-28 06:29 UTC

Affected packages and fixes

simd-json-derive

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.12.0 (semver)

Fixed versions

0.12.0

Fix

  • Fixed version 0.12.0
    cargo update -p simd-json-derive --precise 0.12.0

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: RustSec Advisory Database · CC0-1.0

Sources & licences