array-queue
Affected
- introduced
0.3.0, fixed0.4.0(semver)
Fixed versions
0.4.0
Fix
- Fixed version
0.4.0cargo update -p array-queue --precise 0.4.0
Advisory
Also known as: GHSA-xqjr-wfx3-gmxv
ArrayQueue::push_front is not panic-safe
The safe API array_queue::ArrayQueue::push_front can lead to deallocating uninitialized memory if a panic occurs while invoking the clone method on the passed argument.
Specifically, push_front receives an argument that is intended to be cloned and pushed, whose type implements the Clone trait. Furthermore, the method updates the queue's start index before initializing the slot for the newly pushed element. User-defined implementations of Clone may include a clone method that can panic. If such a panic occurs during initialization, the structure is left with an advanced start index pointing to an uninitialized slot. When ArrayQueue is later dropped, its destructor treats that slot as initialized and attempts to drop it, resulting in an attempt to free uninitialized memory.
The bug was fixed in commit 728fe1b.
Not rated by the source.
0.3.0, fixed 0.4.0 (semver)0.4.0
0.4.0cargo update -p array-queue --precise 0.4.0Fix 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
Source: RustSec Advisory Database · CC0-1.0