RUSTSEC-2026-0402
JSON

Not scored

Heap buffer overflow in `CCtx::try_clone` on a multithreaded context

Severity
Not scored
Published
Last changed

Description

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

Product or packageVersionsReported by
zstd-safe (crates.io)from 4.1.4 before 7.4.0, from 8.0.0-0 before 8.2.0RustSec Advisory Database

References

Sources

SourceRecordLicence
RustSec Advisory DatabaseRUSTSEC-2026-0402 changed 2026-11-02CC0-1.0