First published: Sun Apr 11 2021(Updated: )
In the standard library in Rust before 1.2.0, BinaryHeap is not panic-safe. The binary heap is left in an inconsistent state when the comparison of generic elements inside sift_up or sift_down_range panics. This bug leads to a drop of zeroed memory as an arbitrary type, which can result in a memory safety violation.
Credit: cve@mitre.org
Affected Software | Affected Version | How to fix |
---|---|---|
Rust-lang Rust | <1.2.0 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The vulnerability ID of this issue is CVE-2015-20001.
CVE-2015-20001 has a severity of high.
CVE-2015-20001 affects Rust version up to 1.2.0. It is a bug in the standard library regarding the panic-safety of the BinaryHeap type.
If the comparison of generic elements inside sift_up or sift_down_range panics in Rust, the binary heap can be left in an inconsistent state and result in a drop of zeroed memory as an arbitrary type, potentially leading to a memory error.
Yes, you can find more information about CVE-2015-20001 in the following references: [link1](https://github.com/rust-lang/rust/issues/25842) and [link2](https://github.com/rust-lang/rust/pull/25856).