CVE-2022-36086

Public Exploit
linked_list_allocator vulnerable to out-of-bound writes on `Heap` initialization and `Heap::extend`

Description

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>()`.

Categories

8.4
CVSS
Severity: High
CVSS 3.1 •
EPSS 0.08%
Third-Party Advisory github.com Third-Party Advisory github.com
Affected: rust-osdev linked-list-allocator
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2022-36086?
CVE-2022-36086 has been scored as a high severity vulnerability.
How to fix CVE-2022-36086?
To fix CVE-2022-36086, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2022-36086 being actively exploited in the wild?
It is possible that CVE-2022-36086 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2022-36086?
CVE-2022-36086 affects rust-osdev linked-list-allocator.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.