# GHSA-X3F4-45XF-RJM7: ruzstd uninit and out-of-bounds memory reads

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2024-12-02
- Modified: 2026-09-10

## Also published as

- [RUSTSEC-2024-0400](https://cve.now/RUSTSEC-2024-0400.md) (RustSec)

## Affected versions

- ruzstd (crates.io): from 0.7.0, fixed in 0.7.3

## 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.

## References

- https://github.com/KillingSpark/zstd-rs/issues/75
- https://github.com/KillingSpark/zstd-rs/pull/76
- https://github.com/KillingSpark/zstd-rs
- https://rustsec.org/advisories/RUSTSEC-2024-0400.html

Page: https://cve.now/GHSA-X3F4-45XF-RJM7

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
