Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.

gyscos/zstd-safe may crash from dangling dictionary reference

published 19 days ago
Summary

When using the experimental init_using_cdict or init_using_ddict functions, the library could keep a reference to a dictionary that might be freed while still in use. This can cause the program to crash or behave unpredictably. Update to the latest version of gyscos/zstd-safe, which changes the code to hold the dictionary safely, or avoid using these experimental functions.

What to do
  • Update gyscos zstd-safe to version 8.2.0.
Affected software
Ecosystem VendorProductAffected versions
crates.io gyscos zstd-safe >= 3.0.0, < 8.2.0
Fix: upgrade to 8.2.0
Original advisory text
Use-after-free through `init_using_cdict` and `init_using_ddict`
`CCtx::init_using_cdict` and `DCtx::init_using_ddict` (`experimental`
feature, deprecated) took the dictionary as `&CDict<'b>` and `&DDict<'b>`
with only `'b: 'a`, so the dictionary itself could be dropped while the
context still pointed at it. The same mistake in other constructors was
fixed earlier (<https://github.com/gyscos/zstd-rs/issues/365>).

The flaw was corrected by taking `&'a CDict<'b>` and `&'a DDict<'b>`.
Timeline
Published16 Oct 2026
Updated26 Oct 2026
First seen26 Oct 2026
Sources
Track software like this
Free during beta