Use After Free Affecting smallvec package, versions <0.6.10


0.0
medium

Snyk CVSS

    Attack Complexity High

    Threat Intelligence

    EPSS 0.24% (62nd percentile)
Expand this section
NVD
9.8 critical

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-RUST-SMALLVEC-451501
  • published 3 Jul 2019
  • disclosed 6 Jun 2019
  • credit Eric Huss

How to fix?

Upgrade smallvec to version 0.6.10 or higher.

Overview

smallvec is a "Small vector" optimization for Rust: store up to a small number of items on the stack.

Affected versions of this package are vulnerable to Use After Free in SmallVec::grow(). Attempting to call grow 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.