DHI-6f32-clud-esvj-cqnn
On wasm32, zstd-sys provides `malloc` and `free` to the C library through a
- CVSS
- —
- EPSS
- —
- Published
- 2026-11-19
- Age
- 14d old
- Modified
- 2026-12-03
- Product
- nvflare
Description
On wasm32, zstd-sys provides `malloc` and `free` to the C library through a shim over Rust's allocator. The shim did not check for allocation failure: it wrote its size header to address 0 and returned address 4, which the C library used as a valid buffer. `free(NULL)` also read below address 0. Whenever the instance cannot grow its memory by what a frame asks for, a small crafted frame (a 9-byte header declaring a 128 MiB window is enough) made decompression write decoded data over the bottom of the module's linear memory, instead of failing. The corruption stays within the wasm sandbox. The flaw was corrected by returning NULL on allocation failure or size overflow, and by making `free(NULL)` a no-op.
Sources
- OSV · first seen 14d ago · CC-BY 4.0
References
- https://scout.docker.com/v/DHI-6f32-clud-esvj-cqnn advisory
- https://rustsec.org/advisories/RUSTSEC-2026-0410 advisory
- https://rustsec.org/advisories/RUSTSEC-2026-0410.html advisory
- https://github.com/gyscos/zstd-rs/pull/384 fix
- https://github.com/gyscos/zstd-rs/commit/165d1625553c236b9700ca794b8a7c51f5d98314 fix