RUSTSEC-2026-0402
not scored yetHeap buffer overflow in `CCtx::try_clone` on a multithreaded context
CCtx::try_clone (experimental feature, deprecated) copies tables sized
from the context's applied parameters. Starting a multithreaded frame
(zstdmt feature) replaces those parameters with the workers' without
resizing the context's own tables, so after an abandoned single-threaded
frame, the copy wrote up to 512 KiB past a heap allocation, or read past
one. This became reachable with the bundled zstd 1.5.6.
The flaw was corrected by refusing try_clone (and the unsafe
compress_block) once NbWorkers was set on the context.
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | zstd-safe | >= 4.1.4, < 7.4.0; >= 8.0.0-0, < 8.2.0 | 7.4.0, 8.2.0 |
References
- https://crates.io/crates/zstd-safe · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2026-0402.html · ADVISORY
- https://github.com/gyscos/zstd-rs/commit/682b8b2967cf4aba5cfe2d940d1e381a3e23211a · WEB
- https://github.com/gyscos/zstd-rs/pull/384 · WEB
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 16 Oct 2026)