{"answers":{"affected":"3 open source packages ship an affected version, including linked_list_allocator. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-36086 exists.","fix":"Upgrade linked_list_allocator to 0.10.2 or later.","what":"CVE-2022-36086 is a high-severity memory corruption vulnerability in rust-osdev linked-list-allocator, published on 7 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-36086 and fix it if it is affected.\n\nWhat it is: CVE-2022-36086 is a high-severity memory corruption vulnerability in rust-osdev linked-list-allocator, published on 7 Sep 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-36086 exists.\n\nAffected packages and fixed versions:\n- linked_list_allocator (crates.io): affected all versions; fixed in 0.10.2\n- linked_list_allocator (crates.io): affected all versions; fixed in 0.10.2\n- linked_list_allocator (crates.io): affected from 0.0.0-0; fixed in 0.10.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-36086/ (Markdown: https://insights.sbomify.com/CVE-2022-36086/index.md)","id":"CVE-2022-36086","markdown":"https://insights.sbomify.com/CVE-2022-36086/index.md","name":"CVE-2022-36086","record":{"aliases":["GHSA-xg8p-34w2-j49j","RUSTSEC-2022-0063"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Rust memory allocator","requires_auth":"none","summary":"An attacker can trigger out-of-bound writes in the linked_list_allocator library by initializing a heap with an insufficient size, potentially leading to memory corruption or crashes.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"linked-list-allocator","vendor":"rust-osdev"}],"cvss":{"score":8.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-1284","name":"Improper Validation of Specified Quantity in Input"},{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"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::\u003cusize\u003e` 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::\u003cusize\u003e` and that the `Heap::extend` method is only called with sizes larger than `2 * size_of::\u003cusize\u003e()`. Also, ensure that the total heap size is (and stays) a multiple of `2 * size_of::\u003cusize\u003e()`.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"linked_list_allocator vulnerable to out-of-bound writes on `Heap` initialization and `Heap::extend`","id":"CVE-2022-36086","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2022"},"n_packages":3,"n_references":2,"next":{"headline":"OAuthLib vulnerable DoS when attacker provides malicious IPV6 URI","id":"CVE-2022-36087"},"packages":[{"ecosystem":"crates.io","fixed":["0.10.2"],"introduced":["0"],"last_affected":[],"package":"linked_list_allocator","purl":null,"source":"GHSA-xg8p-34w2-j49j"},{"ecosystem":"crates.io","fixed":["0.10.2"],"introduced":["0"],"last_affected":[],"package":"linked_list_allocator","purl":"pkg:cargo/linked_list_allocator","source":"GHSA-xg8p-34w2-j49j"},{"ecosystem":"crates.io","fixed":["0.10.2"],"introduced":["0.0.0-0"],"last_affected":[],"package":"linked_list_allocator","purl":"pkg:cargo/linked_list_allocator","source":"RUSTSEC-2022-0063"}],"prev":{"headline":"OPA Compiler: Bypass of WithUnsafeBuiltins using `with` keyword to mock functions","id":"CVE-2022-36085"},"products":["linked-list-allocator"],"published":"2022-09-07","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["rust-osdev"]},"summary":"An attacker can trigger out-of-bound writes in the linked_list_allocator library by initializing a heap with an insufficient size, potentially leading to memory corruption or crashes.","url":"https://insights.sbomify.com/CVE-2022-36086/"}