PT-2021-18546

CVE-2021-29933

·

Published

2021-01-26

·

Updated

2021-08-25

Description by

CVSS 3.1
7.5
High
MetricsAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions insert many crate through 2021-01-26
Description An issue in the insert many crate for Rust may cause elements to be dropped twice if the next() method of an iterator panics. This occurs because affected versions of insert many used ptr::copy to move items in a vector, duplicating their ownership, and then iterated over a provided Iterator to insert new items. If the iterator's next() method panics, the vector would drop the same elements twice.
Recommendations For insert many crate through 2021-01-26, consider updating to a version that does not use ptr::copy to move items in a vector, to prevent elements from being dropped twice in case of a panic. As a temporary workaround, consider handling the panic in the next() method to prevent the double drop of elements.
Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Weakness enumeration
Related identifiers
GHSA-29HG-R7C7-54FR
RUSTSEC-2021-0042
Found an issue in the description? Have something to add? Feel free to write us 👾