CVE-2021-29942 Out of bounds write in reorder

High 7.3 Published Updated

The Rust reorder crate may return uninitialized values, potentially leading to memory corruption or crashes when an iterator reports an incorrect length.

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

What is CVE-2021-29942?

CVE-2021-29942 is a high-severity memory corruption vulnerability in n/a, published on 1 Apr 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 reorder crate through 2021-02-24 for Rust. swap_index can return uninitialized values if an iterator returns a len() that is too large.

Weakness: CWE-787

Which versions are affected by CVE-2021-29942?

2 open source packages ship an affected version, including reorder. It affects 1 product.

PackageAffectedFixed in
reorder crates.ioAll versions1.1.0
reorder crates.ioAll versions1.1.0

Products include Reorder Project Reorder.

How do I fix CVE-2021-29942?

Upgrade reorder to 1.1.0 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-29942 being exploited?

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

Sources

Also known as GHSA-jpwg-6gf5-5vh9.

Is CVE-2021-29942 in your software?

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

Check your SBOMs for free