Free of Memory not on the Heap Affecting maligned package, versions >=0.0.0


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept

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-MALIGNED-3339528
  • published5 Mar 2023
  • disclosed4 Mar 2023
  • creditUnknown

Introduced: 4 Mar 2023

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

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

Affected versions of this package are vulnerable to Free of Memory not on the Heap. maligned::align_first manually allocates with an alignment larger than T, and then uses Vec::from_raw_parts on that allocation to get a Vec<T>. GlobalAlloc::dealloc requires that the layout argument must be the same layout that was used to allocate that block of memory. When deallocating, Box and Vec may not respect the specified alignment.

CVSS Scores

version 3.1