RustSec Advisory Database
RUSTSEC-2021-0033
push_cloned can drop uninitialized memory or double free on panic
Details
Affected versions of stack_dst used a push_inner function that increased the internal length of the array and then called val.clone().
If the val.clone() call panics, the stack could drop an already dropped element or drop uninitialized memory.
This issue was fixed in 2a4d538 by increasing the length of the array after elements are cloned.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| crates.io | stack_dst | From 0.0.0-0 before 0.6.1 (fixed in 0.6.1) |