Uninitialized Memory Exposure Affecting autorand package, versions <0.2.3


Severity

Recommended
0.0
high
0
10

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

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-AUTORAND-1244521
  • published9 Apr 2021
  • disclosed31 Dec 2020
  • creditUnknown

Introduced: 31 Dec 2020

CVE NOT AVAILABLE CWE-201  (opens in a new tab)

How to fix?

Upgrade autorand to version 0.2.3 or higher.

Overview

autorand is an Automatic random generation for any struct or enum.

Affected versions of this package are vulnerable to Uninitialized Memory Exposure. Affected versions of this crate had a panic safety issue to drop partially uninitialized array of T upon panic in a user provided function T::random(). Dropping uninitialized T can potentially cause memory corruption or undefined behavior. The flaw was corrected in commit 565d508 by using MaybeUninit<T> to avoid possible dropping of uninitialized memory upon panic.

CVSS Scores

version 3.1