Double free in `DCtx::try_clone`
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 8.2.0
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
This vulnerability affects the Zstandard (zstd) compression library's Rust bindings, specifically the experimental `DCtx::try_clone` decompression-context function. Cloning certain decompression contexts could cause memory to be freed twice, which may crash the application or corrupt memory, and it could also silently drop the window size limit that guards against overly large decompression buffers.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original 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.
Timeline
- Advisory published
- Record last updated
Affected versions
- zstd-safecrates.io
From 4.1.4 · fixed in 8.2.0