Advisory

RUSTSEC-2021-0042

Also known as: CVE-2021-29933, GHSA-29hg-r7c7-54fr

Summary

insert_many can drop elements twice on panic

Details

Affected versions of insert_many used ptr::copy to move over items in a
vector to make space before inserting, duplicating their ownership. It then
iterated over a provided Iterator to insert the new items.

If the iterator's .next() method panics then the vector would drop the same
elements twice.

Severity

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

Dates

Published
2021-01-26 12:00 UTC
Modified
2023-11-08 04:05 UTC

Affected packages and fixes

insert_many

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