GHSA-3QM2-RFQW-FMRW
Vulnerability from github – Published: 2022-05-24 17:43 – Updated: 2023-06-13 20:40
VLAI?
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.
Severity ?
9.8 (Critical)
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "scratchpad"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-28031"
],
"database_specific": {
"cwe_ids": [
"CWE-415"
],
"github_reviewed": true,
"github_reviewed_at": "2022-06-17T00:23:59Z",
"nvd_published_at": "2021-03-05T09:15:00Z",
"severity": "CRITICAL"
},
"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.\n\nThe flaw was fixed in commit `891561bea` by removing the unsafe block and using a plain iterator.",
"id": "GHSA-3qm2-rfqw-fmrw",
"modified": "2023-06-13T20:40:29Z",
"published": "2022-05-24T17:43:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-28031"
},
{
"type": "WEB",
"url": "https://github.com/okready/scratchpad/issues/1"
},
{
"type": "WEB",
"url": "https://github.com/okready/scratchpad/commit/891561bea"
},
{
"type": "PACKAGE",
"url": "https://github.com/okready/scratchpad"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2021-0030.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "move_elements can double-free objects on panic"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…