9.8critical
Double free in through
- Severity
- 9.8critical CVSS:3.1 by NVD
- Exploit likelihood
- 1.37% (higher than 72% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-5hpj-m323-cphmRUSTSEC-2021-0049
Description
An issue was discovered in the through crate through 2021-02-18 for Rust. There is a double free (in through and through_and) upon a panic of the map function.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| through (crates.io) | up to 0.1.0, from 0.0.0-0 | GitHub Advisory Database, RustSec Advisory Database |
| through_project through | up to 2021-02-18 | NVD |
All scores
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| RustSec Advisory Database | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
An issue was discovered in the through crate through 2021-02-18 for Rust. There is a double free (in through and through_and) upon a panic of the map function.
RustSec Advisory Database
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.
NVD (es)
Se detectó un problema en la crate through hasta el 18-02-2021 para Rust. Se presenta una doble liberación (en through y through_and) tras un pánico de la función map.
References
| https://rustsec.org/advisories/RUSTSEC-2021-0049.html | advisory, exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-29940 | advisory | |
| https://github.com/gretchenfrage/through/issues/1 | report, web | |
| https://github.com/gretchenfrage/through | package | |
| https://crates.io/crates/through | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-29940 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5hpj-m323-cphm changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2021-0049 changed 2023-11-08 | CC0-1.0 |
| NVD | CVE-2021-29940 changed 2026-06-17 | Public domain |