{"id":"RUSTSEC-2021-0047","summary":"SliceDeque::drain_filter can double drop an element if the predicate panics","details":"Affected versions of the crate incremented the current index of the drain filter\niterator *before* calling the predicate function `self.pred`.\n\nIf the predicate function panics, it is possible for the last element in the\niterator to be dropped twice.","aliases":["CVE-2021-29938","GHSA-p9gf-gmfv-398m"],"modified":"2023-11-08T04:05:44.001761Z","published":"2021-02-19T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/slice-deque"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2021-0047.html"},{"type":"REPORT","url":"https://github.com/gnzlbg/slice_deque/issues/90"}],"affected":[{"package":{"name":"slice-deque","ecosystem":"crates.io","purl":"pkg:cargo/slice-deque"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}],"ecosystem_specific":{"affects":{"functions":[],"os":[],"arch":[]},"affected_functions":null},"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-0047.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"}]}