{"id":"RUSTSEC-2021-0018","summary":"insert_slice_clone can double drop if Clone panics.","details":"Affected versions of this crate used `ptr::copy` when inserting into the middle\nof a `Vec`. When ownership was temporarily duplicated during this copy, it calls\nthe clone method of a user provided element.\n\nThis issue can result in an element being double-freed if the clone call panics.\n\nCommit `20cb73d` fixed this issue by adding a `set_len(0)` call before\noperating on the vector to avoid dropping the elements during a panic.","aliases":["CVE-2021-26954","GHSA-68p4-pjpf-xwcq"],"modified":"2023-11-08T04:05:23.024619Z","published":"2021-02-03T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/qwutils"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2021-0018.html"},{"type":"REPORT","url":"https://github.com/qwertz19281/rust_utils/issues/3"}],"affected":[{"package":{"name":"qwutils","ecosystem":"crates.io","purl":"pkg:cargo/qwutils"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.3.1"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"arch":[],"functions":["qwutils::imp::vec::VecExt::insert_slice_clone"],"os":[]}},"database_specific":{"informational":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0018.json","categories":["memory-corruption"],"cvss":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"}}],"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:L"}]}