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.

Permalink: https://github.com/advisories/GHSA-3qm2-rfqw-fmrw
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0zcW0yLXJmcXctZm1yd84AAnvc
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: almost 2 years ago
Updated: 11 months 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: Repository: https://github.com/okready/scratchpad
Blast Radius: 15.7

Affected Packages

cargo:scratchpad
Dependent packages: 0
Dependent repositories: 40
Downloads: 6,495 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