GHSA-wm8x-php5-hvq6 – maligned
Package
Manager: cargo
Name: maligned
Vulnerable Version: >=0 <=0.2.1
Severity
Level: Medium
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N/E:U/RL:O/RC:C
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
EPSS: N/A pctlN/A
Details
Maligned causes incorrect deallocation `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`](https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#tymethod.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 and can cause undefined behavior.
Metadata
Created: 2023-03-07T20:13:19Z
Modified: 2023-03-07T20:13:19Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/03/GHSA-wm8x-php5-hvq6/GHSA-wm8x-php5-hvq6.json
CWE IDs: []
Alternative ID: N/A
Finding: F184
Auto approve: 1