Advisory

RUSTSEC-2019-0009

Also known as: CVE-2019-15551, GHSA-mm7v-vpv8-xfc3

Summary

Double-free and use-after-free in SmallVec::grow()

Details

Attempting to call grow on a spilled SmallVec with a value equal to the current capacity causes it to free the existing data. This performs a double free immediately and may lead to use-after-free on subsequent accesses to the SmallVec contents.

An attacker that controls the value passed to grow may exploit this flaw to obtain memory contents or gain remote code execution.

Credits to @ehuss for discovering, reporting and fixing the bug.

Severity

Critical Basis: CVSS v3 score 9.8, vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2019-06-06 12:00 UTC
Modified
2026-07-17 16:00 UTC

Affected packages and fixes

smallvec

crates.io · All systems

Affected

  • introduced 0.6.5, fixed 0.6.10 (semver)

Fixed versions

0.6.10

Fix

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

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