# RUSTSEC-2026-0404: Double free in `DCtx::try_clone`

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-10-16T12:00:00.000Z
- Modified: 2026-11-02T09:30:04.168Z

## Description

`DCtx::try_clone` (`experimental` feature, deprecated) is a plain copy of the
C context. A context owning a dictionary (from `load_dictionary`,
`ref_prefix` or `init_using_dict`) or a dictionary table (`ref_ddict` with
`RefMultipleDDicts`) ended up with both copies freeing it. A context cloned
mid-frame resumed on uninitialized stream state. The clone also silently lost
the `WindowLogMax` limit.

The flaw was corrected by refusing to clone such contexts, and by carrying
over the parameters the copy leaves out.

(As written by RustSec Advisory Database.)

## Affected

- zstd-safe (crates.io): from 4.1.4 before 7.4.0; from 8.0.0-0 before 8.2.0

## References

- <https://crates.io/crates/zstd-safe> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0404.html> (advisory)
- <https://github.com/gyscos/zstd-rs/commit/cee6529b553ec600a8e152aaca15a91598820ecf> (web)
- <https://github.com/gyscos/zstd-rs/pull/384> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0404](https://rustsec.org/advisories/RUSTSEC-2026-0404.html), CC0-1.0, modified 2026-11-02

---

Page: https://cve.day/RUSTSEC-2026-0404 · Whole record: https://cve.day/RUSTSEC-2026-0404.json · Rebuilt by cve.day 2026-11-25T22:56:43.452Z
