CVE-2021-29940
JSON

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 packageVersionsReported by
Unspecified productn/aCVE List
through (crates.io)up to 0.1.0, from 0.0.0-0GitHub Advisory Database, RustSec Advisory Database
through_project throughup to 2021-02-18NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
RustSec Advisory Database9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV: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

Sources

SourceRecordLicence
CVE ListCVE-2021-29940 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-5hpj-m323-cphm changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0049 changed 2023-11-08CC0-1.0
NVDCVE-2021-29940 changed 2026-06-17Public domain