RUSTSEC-2022-0067
MEDIUMInvalid use of `mem::uninitialized` causes `use-of-uninitialized-value`
The compression and decompression function used mem:uninitialized to create an array of uninitialized values, to later write values into it. This later leads to reads from uninitialized memory.
The flaw was corrected in commit b633bf265e41c60dfce3be7eac4e4dd5e18d06cf by using a heap-allocated Vec and removing out use of mem::uninitialized. The fix was released in v0.3.2 and v1.0.0
Subsequently, the crate was deprecated and its use is discouraged.
- Published
- 22 Oct 2022
- Last modified
- 8 Nov 2023
- Also known as
- GHSA-5m39-wx2q-mxg3
- Sources
- OSV GHSA-5m39-wx2q-mxg3JSONOSVJSON
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | lzf | < 0.3.2 | 0.3.2 |
| OSV | crates.io | lzf | >= 0.0.0-0, < 0.3.2 | 0.3.2 |
References
- https://github.com/badboy/lzf-rs/issues/9 · WEB, REPORT
- https://github.com/badboy/lzf-rs/commit/b633bf265e41c60dfce3be7eac4e4dd5e18d06cf · WEB
- https://github.com/badboy/lzf-rs · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2022-0067.html · WEB, ADVISORY
- https://crates.io/crates/lzf · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 22 Oct 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 8 Nov 2022)