Advisory

GHSA-rxr4-x558-x7hw

Also known as: CVE-2018-20991, RUSTSEC-2018-0003

Summary

Double free in smallvec

Details

If an iterator passed to SmallVec::insert_many panicked in Iterator::next, destructors were run during unwinding while the vector was in an inconsistent state, possibly causing a double free (a destructor running on two copies of the same value).

This is fixed in smallvec 0.6.3 by ensuring that the vector's length is not updated to include moved items until they have been removed from their original positions. Items may now be leaked if Iterator::next panics, but they will not be dropped more than once.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2021-08-25 20:42 UTC
Modified
2023-11-08 04:00 UTC

Affected packages and fixes

smallvec

crates.io · All systems

Affected

  • introduced 0.3.2, fixed 0.6.3 (semver)

Fixed versions

0.6.3

Fix

  • Fixed version 0.6.3
    cargo update -p smallvec --precise 0.6.3

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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences