Advisory

RUSTSEC-2021-0049

Also known as: CVE-2021-29940, GHSA-5hpj-m323-cphm

Summary

through and through_and causes a double free if the map function panics

Details

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.

Severity

Critical Basis: CVSS v3 score 9.8, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2021-02-18 12:00 UTC
Modified
2023-11-08 04:05 UTC

Affected packages and fixes

through

crates.io · All systems

Affected

  • introduced 0.0.0-0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences