{"id":"CVE-2022-36086","published":"2022-09-07T22:50:09Z","modified":"2025-04-22T17:23:22Z","title":"linked_list_allocator vulnerable to out-of-bound writes on `Heap` initialization and `Heap::extend`","vendor":"rust-osdev","product":"linked-list-allocator","tier":"tail","description":{"text":"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>()`.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0088,"percentile":0.59969,"provenance":"source"},"cwes":[{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"},{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/rust-osdev/linked-list-allocator/security/advisories/GHSA-xg8p-34w2-j49j","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/rust-osdev/linked-list-allocator/commit/013b0758643943e8df5b17bbb495460ff47e8bbf","tags":["x_refsource_MISC"]}],"priority":{"score":17.9,"factors":[{"name":"EPSS percentile","points":11.99},{"name":"CVSS severity","points":5.88}]},"vendorSlug":"rust-osdev","affectedVersions":[{"vendor":"rust-osdev","product":"linked-list-allocator","versions":["< 0.10.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-04-22T15:42:12.682877Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"linked_list_allocator","vulnerableRanges":["<0.10.2",">=0.0.0-0, <0.10.2"],"patched":["0.10.2"],"from":["GHSA-xg8p-34w2-j49j","RUSTSEC-2022-0063"],"provenance":"source"}],"summary":{"text":"The linked-list-allocator crate from rust-osdev, used for no_std systems, has a missing minimum size check in its heap initialization and extension code, affecting the Heap and LockedHeap types (including Heap::new, Heap::init, Heap::init_from_slice, LockedHeap::new, and multiple uses of Heap::extend) in versions before 0.10.2. An attacker who can get the system to initialize or extend a heap with a size below the required minimum can trigger out-of-bounds writes through metadata operations, and the attack is reachable only through local access, with no privileges or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:35:37Z"},"euvd":{"id":"EUVD-2022-6977","exploited":false,"provenance":"source"}}