Skip to content

smallvec creates uninitialized value of any type

Moderate severity GitHub Reviewed Published Aug 25, 2021 to the GitHub Advisory Database • Updated Jan 11, 2023

Package

cargo smallvec (Rust)

Affected versions

< 0.6.13

Patched versions

0.6.13

Description

Affected versions of this crate called mem::uninitialized() to create values of a user-supplied type T.
This is unsound e.g. if T is a reference type (which must be non-null and thus may not remain uninitialized).

The flaw was corrected by avoiding the use of mem::uninitialized(), using MaybeUninit instead.

References

Reviewed Aug 6, 2021
Published to the GitHub Advisory Database Aug 25, 2021
Last updated Jan 11, 2023

Severity

Moderate

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-66p5-j55p-32r9

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.