GHSA-mrrw-grhq-86gf Ascii allows out-of-bounds array indexing in safe code

Not scored Published

The Rust ascii crate allows out-of-bounds array indexing in safe code, potentially leading to memory corruption or crashes.

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

What is GHSA-mrrw-grhq-86gf?

GHSA-mrrw-grhq-86gf is a memory corruption vulnerability in ascii, published on 25 Feb 2023.

Official description

Affected version of this crate had implementation of From<&mut AsciiStr> for &mut [u8] and &mut str. This can result in out-of-bounds array indexing in safe code.

The flaw was corrected in commit 8a6c779 by removing those impls.

Which versions are affected by GHSA-mrrw-grhq-86gf?

3 open source packages ship an affected version, including ascii.

PackageAffectedFixed in
ascii crates.ioFrom 0.6.1-00.9.3
ascii crates.ioFrom 0.7.00.9.3
ascii crates.ioFrom 0.7.00.9.3

How do I fix GHSA-mrrw-grhq-86gf?

Upgrade ascii to 0.9.3 or later.

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

Is GHSA-mrrw-grhq-86gf being exploited?

There is no known exploitation of GHSA-mrrw-grhq-86gf in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2023-0015.

Is GHSA-mrrw-grhq-86gf in your software?

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

Check your SBOMs for free