Double free in `DCtx::try_clone`
`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.
- Products
- zstd-safe
- Affected versions
- Not specified
- Fixed versions
- 8.2.0
- CVEs
- Not specified
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 14:47 UTC · Revision 1
Source evidence
`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.
osv:RUSTSEC-2026-0404
zstd-safe
Fixed versions: 8.2.0
Complete source record
{
"id": "01497a89d28226e00768ef8afdf18027bc7c8be5c1d92b50bac85fbcd6a723b8",
"url": "https://osv.dev/vulnerability/RUSTSEC-2026-0404",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Double free in `DCtx::try_clone`",
"summary": "`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.",
"evidence": "osv:RUSTSEC-2026-0404",
"products": [
{
"name": {
"value": "zstd-safe",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "8.2.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "RUSTSEC-2026-0404",
"aliases": [
"RUSTSEC-2026-0404"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "4.1.4"
},
{
"fixed": "8.2.0"
}
]
}
],
"package": {
"name": "zstd-safe",
"purl": "pkg:cargo/zstd-safe",
"ecosystem": "crates.io"
},
"database_specific": {
"cvss": null,
"source": "https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0404.json",
"categories": [
"memory-corruption"
],
"informational": "unsound"
},
"ecosystem_specific": {
"affects": {
"os": [],
"arch": [],
"functions": [
"zstd_safe::DCtx::try_clone"
]
},
"affected_functions": null
}
}
],
"modified": "2026-10-26T14:00:05.092817237Z",
"provider": "osv",
"references": [
"https://crates.io/crates/zstd-safe",
"https://rustsec.org/advisories/RUSTSEC-2026-0404.html",
"https://github.com/gyscos/zstd-rs/commit/cee6529b553ec600a8e152aaca15a91598820ecf",
"https://github.com/gyscos/zstd-rs/pull/384"
],
"provider_metadata": {
"license": "CC0-1.0"
}
},
"related_cves": [],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 454191,
"published_at": "2026-10-16T12:00:00+00:00"
}