Advisory

RUSTSEC-2021-0047

Also known as: CVE-2021-29938, GHSA-p9gf-gmfv-398m

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
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.

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2021-02-19 12:00 UTC
Modified
2023-11-08 04:05 UTC

Affected packages and fixes

slice-deque

crates.io · All systems

Affected

  • introduced 0.0.0-0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences