Skip to content

RUSTSEC-2026-0397 `OutBuffer::around_pos` exposes uninitialized memory

Unknown
Published
Updated
Exploit status
No public exploit known

Description

OutBuffer::around_pos accepted a position past the initialized length of a
Vec<u8>. The next streaming call then marked everything before the
position as initialized, so safe code could read stale heap memory between
the vector's previous length and that position.

The flaw was corrected by zero-filling that gap.

Upgrade path

1 package: 1 fixed.

PackageAffectedFixed inStatus
crates.io zstd-safe(crates.io) >= 4.0.0, < 7.4.0; >= 8.0.0-0, < 8.2.0 7.4.0, 8.2.0 Fixed

Affected products

ProductAffected versionsFixed in
crates.io zstd-safe(crates.io) >= 4.0.0, < 7.4.0 7.4.0
crates.io zstd-safe(crates.io) >= 8.0.0-0, < 8.2.0 8.2.0

References