Use After Free Affecting smallvec package, versions <0.6.10


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.22% (60th percentile)

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 Learn

Learn about Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-SMALLVEC-451501
  • published3 Jul 2019
  • disclosed6 Jun 2019
  • creditEric Huss

Introduced: 6 Jun 2019

CVE-2019-15551  (opens in a new tab)
CVE-2019-15554  (opens in a new tab)
CWE-416  (opens in a new tab)

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.

CVSS Scores

version 3.1