GitHub Advisoryadvisory · crates.io
GHSA-8mjx-h23h-w2pg Double free in stack_dst
CRITICAL
Official page ↗
- Aliases
- CVE-2021-28034
- Ecosystem
- crates.io
- Packages
- stack_dst
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-415
- Reviewed
- 2021-08-30
Affected packages
• crates.io stack_dst: < 0.6.1 → fixed in 0.6.1
Description
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.
Related
Alias · CVE (1)
- CVE-2021-28034 An issue was discovered in the stack_dst crate before 0.6.1 for Rust. vulnerability
Weakness · CWE (1)
- CWE-415 Double Free weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-28034 advisory
- https://github.com/thepowersgang/stack_dst-rs/issues/5 web
- https://github.com/thepowersgang/stack_dst-rs/commit/2a4d538 web
- https://github.com/thepowersgang/stack_dst-rs/commit/2a4d53809e3000f40085f2b229b6b1a33759881d web
- https://github.com/thepowersgang/stack_dst-rs package
- https://rustsec.org/advisories/RUSTSEC-2021-0033.html web