Rust advisories / linked_list_allocator
Vulnerability HighRUSTSEC-2022-0063 · linked_list_allocator
RUSTSEC-2022-0063: Multiple vulnerabilities resulting in out-of-bounds writes
Short answerA security vulnerability in the linked_list_allocator crate: Multiple vulnerabilities resulting in out-of-bounds writes. High severity (CVSS 8.4). Fixed in 0.10.2: update to a fixed version.
| Crate | linked_list_allocator |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | Before 0.10.2. |
| Fixed in | 0.10.2 |
| Severity | High, CVSS 8.4 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2022-09-07 |
| Last changed | 2026-10-12 |
| Also known as | CVE-2022-36086, GHSA-xg8p-34w2-j49j |
What to do
- See which version you have:
cargo tree -i linked_list_allocator(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p linked_list_allocator. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplelinked_list_allocator = "0.10.2") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
- The heap initialization methods were missing a minimum size check for the given heap size argument. This could lead to **out-of-bound writes** when a heap was initialized with a size smaller than
3 * size_of::<usize>because of metadata write operations. - When calling
Heap::extendwith a size smaller than twousizes (e.g., 16 onx86_64), the size was erroneously rounded up to the minimum size, which could result in an **out-of-bounds write**. - Calling
Heap::extendon an empty heap tried to construct a heap starting at address 0, which is also an **out-of-bounds write**. - One specific way to trigger this accidentally is to call
Heap::new(or a similar constructor) with a heap size that is smaller than twousizes. This was treated as an empty heap as well. - Calling
Heap::extendon a heap whose size is not a multiple of the size of twousizes resulted in unaligned writes. It also left the heap in an unexpected state, which might lead to subsequent issues. We did not find a way to exploit this undefined behavior yet (apart from DoS on platforms that fault on unaligned writes).
References
- Package: crates.io/crates/linked_list_allocator
- Advisory: rustsec.org/advisories/RUSTSEC-2022-0063.html
- Web: github.com/rust-osdev/linked-list-allocator/commit/013b0758643943e8df5b17bbb495460ff47e8bbf
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?