GHSA-wm8x-php5-hvq6 Maligned causes incorrect deallocation
Unknown
- Published
- Updated
- Exploit status
- No public exploit known
Description
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 and can cause undefined behavior.
Upgrade path
1 package: 0 fixed, 1 partially fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| crates.io maligned(crates.io) | <= 0.2.1; >= 0.0.0-0 | after 0.2.1 | Partially fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| crates.io maligned(crates.io) | <= 0.2.1 | No fix listed |
| crates.io maligned(crates.io) | >= 0.0.0-0 | No fix listed |
References
- github.com issue-tracking
- doc.rust-lang.org
- rustsec.org vendor-advisory
- github.com
- github.com product
- crates.io product