RUSTSEC-2021-0049
Dashboard / Vulnerabilities / RUSTSEC-2021-0049
RUSTSEC-2021-0049
Published: 18 Feb 2021Last Modified: 8 Nov 2023
Aliases:
Summary: `through` and `through_and` causes a double free if the map function panics
Details: `through` and `through_and` take a mutable reference as well as a mapping function to change the provided reference. They do this by calling `ptr::read` on the reference which duplicates ownership and then calling the mapping function. If the mapping function panics, both the original object and the one duplicated by `ptr::read` get dropped, causing a double free.
References: https://crates.io/crates/through, https://rustsec.org/advisories/RUSTSEC-2021-0049.html, https://github.com/gretchenfrage/through/issues/1
Affected packages
Package
Name: through
Purl: pkg:cargo/through
Affected ranges
Type: SEMVER
Events:
Introduced- 0.0.0-0
Fixed -None
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
