HistoryEditJSON (OSV)

RUSTSEC-2019-0012

Memory corruption in SmallVec::grow()

Reported
Issued
Package
smallvec (crates.io)
Type
Vulnerability
Categories
Aliases
References
CVSS Score
9.8 CRITICAL
CVSS Details
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Patched
  • >=0.6.10
Unaffected
  • <0.6.3
Affected Functions
Version
smallvec::SmallVec::grow
  • <0.6.10, >=0.6.3

Description

Attempting to call grow on a spilled SmallVec with a value less than the current capacity causes corruption of memory allocator data structures.

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.

Advisory available under CC0-1.0 license.