Security mailing lists by PureSourceCode

GHSA-wm8x-php5-hvq6

MEDIUM

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 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.

Published
4 Mar 2023
Last modified
8 Nov 2023
Also known as
RUSTSEC-2023-0017
Sources
OSVJSONOSV RUSTSEC-2023-0017JSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io maligned <= 0.2.1
OSV crates.io maligned >= 0.0.0-0

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 4 Mar 2023)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 7 Mar 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.