Advisory

GHSA-wm8x-php5-hvq6

Also known as: RUSTSEC-2023-0017

Summary

Maligned causes incorrect deallocation

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2023-03-07 20:13 UTC
Modified
2023-11-08 04:23 UTC

Affected packages and fixes

maligned

crates.io · All systems

Affected

  • introduced 0, last affected 0.2.1 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences