GHSA-x3f4-45xf-rjm7 `ruzstd` uninit and out-of-bounds memory reads
Attackers can read up to 15 bytes of memory per overshoot by crafting a zstd archive, potentially leaking sensitive data during decompression.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is GHSA-x3f4-45xf-rjm7?
GHSA-x3f4-45xf-rjm7 is a memory corruption vulnerability in ruzstd, published on 28 Nov 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Affected versions of ruzstd miscalculate the length of the allocated and init section of its internal RingBuffer, leading to uninitialized or out-of-bounds reads in copy_bytes_overshooting of up to 15 bytes.
This may result in up to 15 bytes of memory contents being written into the decoded data when decompressing a crafted archive. This may occur multiple times per archive.
Which versions are affected by GHSA-x3f4-45xf-rjm7?
3 open source packages ship an affected version, including ruzstd.
| Package | Affected | Fixed in |
|---|---|---|
ruzstd crates.io | From 0.7.0 | 0.7.3 |
ruzstd crates.io | From 0.7.0 | 0.7.3 |
ruzstd crates.io | From 0.7.0 | 0.7.3 |
How do I fix GHSA-x3f4-45xf-rjm7?
Upgrade ruzstd to 0.7.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-x3f4-45xf-rjm7 being exploited?
There is no known exploitation of GHSA-x3f4-45xf-rjm7 in the wild and no public exploit code.
Sources
Also known as RUSTSEC-2024-0400.