{"id":"RUSTSEC-2021-0042","summary":"insert_many can drop elements twice on panic","details":"Affected versions of `insert_many` used `ptr::copy` to move over items in a\nvector to make space before inserting, duplicating their ownership. It then\niterated over a provided `Iterator` to insert the new items.\n\nIf the iterator's `.next()` method panics then the vector would drop the same\nelements twice.","aliases":["CVE-2021-29933","GHSA-29hg-r7c7-54fr"],"modified":"2023-11-08T04:05:43.697683Z","published":"2021-01-26T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/insert_many"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2021-0042.html"},{"type":"REPORT","url":"https://github.com/rphmeier/insert_many/issues/1"}],"affected":[{"package":{"name":"insert_many","ecosystem":"crates.io","purl":"pkg:cargo/insert_many"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"arch":[],"functions":[],"os":[]}},"database_specific":{"categories":["memory-corruption"],"cvss":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","informational":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0042.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}