Out-of-Bounds Affecting stackvector package, versions *


Severity

Recommended
0.0
low
0
10

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

Threat Intelligence

EPSS
0.18% (56th 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 IDSNYK-RUST-STACKVECTOR-1089727
  • published1 Apr 2021
  • disclosed19 Feb 2021
  • creditUnknown

Introduced: 19 Feb 2021

CVE-2021-29939  (opens in a new tab)
CWE-119  (opens in a new tab)

How to fix?

There is no fixed version for stackvector.

Overview

Affected versions of this package are vulnerable to Out-of-Bounds. StackVec::extend used the lower and upper bounds from an Iterator's size_hint to determine how many items to push into the stack based vector. If the size_hint implementation returned a lower bound that was larger than the upper bound, StackVec would write out of bounds and overwrite memory on the stack. As mentioned by the size_hint documentation, size_hint is mainly for optimization and incorrect implementations should not lead to memory safety issues.

CVSS Scores

version 3.1