RUSTSEC-2021-0030
Dashboard / Vulnerabilities / RUSTSEC-2021-0030
RUSTSEC-2021-0030
Published: 18 Feb 2021Last Modified: 8 Nov 2023
Aliases:
Summary: move_elements can double-free objects on panic
Details: Affected versions of `scratchpad` used `ptr::read` to read elements while calling a user provided function `f` on them. Since the pointer read duplicates ownership, a panic inside the user provided `f` function could cause a double free when unwinding. The flaw was fixed in commit `891561bea` by removing the unsafe block and using a plain iterator.
References: https://crates.io/crates/scratchpad, https://rustsec.org/advisories/RUSTSEC-2021-0030.html, https://github.com/okready/scratchpad/issues/1
Affected packages
Package
Name: scratchpad
Purl: pkg:cargo/scratchpad
Affected ranges
Type: SEMVER
Events:
Introduced- 0.0.0-0
Fixed -1.3.1
Affected versions
Common Vulnerability Scoring System
Attack Vector
Network
Adjacent
Local
Physical
Privileges Required
None
Low
High
User Interaction
None
Required
Scope
Unchanged
Changed
Confidentiality
None
Low
High
Integrity
None
Low
High
Availability
None
Low
High
