CVE-2020-36464 Use after free in heapless

High 7.5 Published Updated

A use-after-free vulnerability in the heapless crate allows attackers to cause memory corruption or crashes via improper cloning of partially consumed iterators.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2020-36464?

CVE-2020-36464 is a high-severity use after free vulnerability in n/a, published on 8 Aug 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An issue was discovered in the heapless crate before 0.6.1 for Rust. The IntoIter Clone implementation clones an entire underlying Vec without considering whether it has already been partially consumed.

Weakness: CWE-416

Which versions are affected by CVE-2020-36464?

3 open source packages ship an affected version, including heapless. It affects 1 product.

PackageAffectedFixed in
heapless crates.ioAll versions0.6.1
heapless crates.ioAll versions0.6.1
heapless crates.ioFrom 0.0.0-00.6.1

Products include Heapless Project Heapless.

How do I fix CVE-2020-36464?

Upgrade heapless to 0.6.1 or later.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2020-36464 being exploited?

There is no known exploitation of CVE-2020-36464 in the wild and no public exploit code.

Sources

Also known as GHSA-qgwf-r2jj-2ccv, RUSTSEC-2020-0145.

Is CVE-2020-36464 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free