Files
advisory-db/packages/maligned.json
T
2025-10-27 16:49:06 +00:00

71 lines
2.1 KiB
JSON

[
{
"id": "RUSTSEC-2023-0017",
"modified": "2023-06-13T13:10:24Z",
"published": "2023-03-04T12:00:00Z",
"aliases": [
"GHSA-wm8x-php5-hvq6"
],
"related": [],
"summary": "`maligned::align_first` 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.",
"severity": [],
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "maligned",
"purl": "pkg:cargo/maligned"
},
"ecosystem_specific": {
"affects": {
"arch": [],
"os": [],
"functions": [
"maligned::align_first",
"maligned::align_first_boxed",
"maligned::align_first_boxed_cloned",
"maligned::align_first_boxed_default"
]
},
"affected_functions": null
},
"database_specific": {
"categories": [
"memory-corruption"
],
"cvss": null,
"informational": "unsound"
},
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0.0.0-0"
}
]
}
],
"versions": []
}
],
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/maligned"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2023-0017.html"
},
{
"type": "REPORT",
"url": "https://github.com/tylerhawkes/maligned/issues/5"
}
],
"database_specific": {
"license": "CC0-1.0"
}
}
]