You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 3, 2026. It is now read-only.
The issue in Chunk::insert_from appears to stem from trusting unvalidated iterator length metadata and using it in unchecked arithmetic.
A malformed iterator can report usize::MAX, causing expressions such as:
self.len() + insert_size
to overflow in release builds (due to wrapping semantics). This may bypass capacity checks and produce invalid insertion ranges.
The resulting metadata inconsistency propagates into internal write paths, where unchecked indices may reach unsafe memory operations, potentially leading to out-of-bounds access and undefined behavior.
Description
The issue in
Chunk::insert_fromappears to stem from trusting unvalidated iterator length metadata and using it in unchecked arithmetic.A malformed iterator can report
usize::MAX, causing expressions such as:to overflow in release builds (due to wrapping semantics). This may bypass capacity checks and produce invalid insertion ranges.
The resulting metadata inconsistency propagates into internal write paths, where unchecked indices may reach unsafe memory operations, potentially leading to out-of-bounds access and undefined behavior.
This can be triggered using safe Rust code only.
PoC
Impact
(command: RUSTFLAGS="-Z sanitizer=address" cargo +nightly run --release)