{"id":"GHSA-wm8x-php5-hvq6","aliases":["RUSTSEC-2023-0017"],"url":"https://o3.security/vulnerability/GHSA-wm8x-php5-hvq6","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>`.\n\n[`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.\n\nWhen deallocating, `Box` and `Vec` may not respect the specified alignment and can cause undefined behavior.\n","published":"2023-03-07T20:13:19Z","modified":"2023-11-08T04:23:53.984745Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"crates.io","name":"maligned","fixedVersion":null}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/tylerhawkes/maligned/issues/5"},{"type":"WEB","url":"https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#tymethod.dealloc"},{"type":"PACKAGE","url":"https://github.com/tylerhawkes/maligned"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2023-0017.html"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2023-11-08T04:23:53.984745Z"}}