CVE-2021-28031 – scratchpad
Package
Manager: cargo
Name: scratchpad
Vulnerable Version: >=0 <1.3.1
Severity
Level: Critical
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS: 0.00418 pctl0.61024
Details
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.
Metadata
Created: 2022-05-24T17:43:48Z
Modified: 2023-06-13T20:40:29Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/05/GHSA-3qm2-rfqw-fmrw/GHSA-3qm2-rfqw-fmrw.json
CWE IDs: ["CWE-415"]
Alternative ID: GHSA-3qm2-rfqw-fmrw
Finding: F138
Auto approve: 1