{"schema_version":"1.9.0","id":"CVE-2022-36086","published":"2022-09-07T22:50:09Z","modified":"2026-08-12T03:51:33.496082157Z","aliases":["GHSA-xg8p-34w2-j49j","RUSTSEC-2022-0063"],"related":["openSUSE-SU-2024:12469-1"],"summary":"linked_list_allocator vulnerable to out-of-bound writes on `Heap` initialization and `Heap::extend`","details":"linked_list_allocator is an allocator usable for no_std systems. Prior to version 0.10.2, 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. This vulnerability impacts all the initialization functions on the `Heap` and `LockedHeap` types, including `Heap::new`, `Heap::init`, `Heap::init_from_slice`, and `LockedHeap::new`. It also affects multiple uses of the `Heap::extend` method. Version 0.10.2 contains a patch for the issue. As a workaround, ensure that the heap is only initialized with a size larger than `3 * size_of::<usize>` and that the `Heap::extend` method is only called with sizes larger than `2 * size_of::<usize>()`. Also, ensure that the total heap size is (and stays) a multiple of `2 * size_of::<usize>()`.","affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/rust-osdev/linked-list-allocator","events":[{"introduced":"0"},{"fixed":"5eb2bc6e671e15f3953e74e7b108cf59e724c2a0"},{"fixed":"013b0758643943e8df5b17bbb495460ff47e8bbf"}],"database_specific":{"cpe":"cpe:2.3:a:rust-osdev:linked-list-allocator:*:*:*:*:*:rust:*:*","extracted_events":[{"introduced":"0"},{"fixed":"0.10.2"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["v0.10.1","v0.10.0","v0.9.1","v0.9.0","v0.8.11","v0.8.10","v0.8.9","v0.8.8","v0.8.7","v0.8.6","v0.8.5","v0.8.4","v0.8.3","v0.8.2","v0.8.1","v0.8.0","v0.7.0","v0.6.6","v0.6.5","v0.6.4","v0.6.3","v0.6.2","v0.6.1","v0.6.0","v0.5.0","v0.4.3","v0.4.2","v0.4.1","v0.4.0","v0.3.0","v0.2.7","v0.2.6","v0.2.5","v0.2.4","linked_list_allocator-0.2.3","v0.2.1","v0.2.0","v0.1.3","v0.1.2","v0.1.1","v0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-36086.json"}}],"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/36xxx/CVE-2022-36086.json"},{"type":"ADVISORY","url":"https://github.com/rust-osdev/linked-list-allocator/security/advisories/GHSA-xg8p-34w2-j49j"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-36086"},{"type":"FIX","url":"https://github.com/rust-osdev/linked-list-allocator/commit/013b0758643943e8df5b17bbb495460ff47e8bbf"}],"database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-119","CWE-787"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/36xxx/CVE-2022-36086.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}