CVE-2021-29938

HIGH7.5EPSS 0.39%

SliceDeque::drain_filter can double drop an element if the predicate panics

Published: 8/25/2021Modified: 11/8/2023
Also known as:GHSA-p9gf-gmfv-398mRUSTSEC-2021-0047

Description

Affected versions of the crate incremented the current index of the drain filter iterator *before* calling the predicate function `self.pred`. If the predicate function panics, it is possible for the last element in the iterator to be dropped twice.

Affected packages (2)

CVSS scores

SourceVersionSeverityVector
osvCVSS 3.1HIGH7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References (5)