GHSA-mrrw-grhq-86gf Ascii allows out-of-bounds array indexing in safe code
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.
| Package | Affected | Fixed in |
|---|---|---|
ascii crates.io | From 0.6.1-0 | 0.9.3 |
ascii crates.io | From 0.7.0 | 0.9.3 |
ascii crates.io | From 0.7.0 | 0.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.