Invalid Memory Access Affecting rand_core package, versions <0.4.2


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

EPSS
0.22% (61st 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-RANDCORE-597155
  • published2 Aug 2020
  • disclosed19 Apr 2019
  • creditUnknown

Introduced: 19 Apr 2019

CVE-2020-25576  (opens in a new tab)
CWE-119  (opens in a new tab)

How to fix?

Upgrade rand_core to version 0.4.2 or higher.

Overview

rand_core is a Core traits and error types of the rand library, plus tools for implementing RNGs.

Affected versions of this package are vulnerable to Invalid Memory Access via the rand_core::BlockRng::fill_bytes and rand_core::BlockRng::next_u64 functions. It violated alignment when casting byte slices to integer slices, resulting in undefined behavior.

CVSS Scores

version 3.1