Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS0zcW0yLXJmcXctZm1yd84AAnvc
move_elements can double-free objects on panic
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.
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0zcW0yLXJmcXctZm1yd84AAnvc
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: over 2 years ago
Updated: over 1 year ago
CVSS Score: 9.8
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Identifiers: GHSA-3qm2-rfqw-fmrw, CVE-2021-28031
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-28031
- https://rustsec.org/advisories/RUSTSEC-2021-0030.html
- https://github.com/okready/scratchpad/issues/1
- https://github.com/okready/scratchpad/commit/891561bea
- https://github.com/advisories/GHSA-3qm2-rfqw-fmrw
Blast Radius: 15.7
Affected Packages
cargo:scratchpad
Dependent packages: 0Dependent repositories: 40
Downloads: 11,629 total
Affected Version Ranges: < 1.3.1
Fixed in: 1.3.1
All affected versions: 0.1.0, 0.1.1, 0.2.0, 0.3.0, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.3.0
All unaffected versions: 1.3.1