GHSA-2326-pfpj-vx3h: lexical-core has multiple soundness issues
RUSTSEC-2024-0377 contains multiple soundness issues: 1. Bytes::read() allows creating instances of types with invalid bit patterns 1. BytesIter::read() advances iterators out of bounds 1. The BytesIter trait has safety invariants but is public and not marked unsafe 1. writefloat() calls MaybeUninit::assumeinit() on uninitialized data, which is is not allowed by the Rust abstract machine 1.
Published Sep 16, 2024
Affected packages
lexical-core
- Ecosystem
- Rust (crates.io)
- Affected
- < 1.0.0
- Fixed in
- 1.0.0
- Check
cargo tree -i lexical-core
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
RUSTSEC-2024-0377 contains multiple soundness issues:
- Bytes::read() allows creating instances of types with invalid bit patterns
- BytesIter::read() advances iterators out of bounds
- The `BytesIter` trait has safety invariants but is public and not marked `unsafe`
- `write_float()` calls `MaybeUninit::assume_init()` on uninitialized data, which is is not allowed by the Rust abstract machine
- `radix()` calls `MaybeUninit::assume_init()` on uninitialized data, which is is not allowed by the Rust abstract machine
Version 1.0 fixes these issues, removes the vast majority of unsafe code, and also fixes some correctness issues.
References
- https://github.com/Alexhuszagh/rust-lexical/issues/101
- https://github.com/Alexhuszagh/rust-lexical/issues/102
- https://github.com/Alexhuszagh/rust-lexical/issues/104
- https://github.com/Alexhuszagh/rust-lexical/issues/126
- https://github.com/Alexhuszagh/rust-lexical/issues/95
- https://github.com/advisories/GHSA-c2hm-mjxv-89r4
- https://rustsec.org/advisories/RUSTSEC-2023-0055
- https://rustsec.org/advisories/RUSTSEC-2023-0086.html
- https://github.com/advisories/GHSA-2326-pfpj-vx3h
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
