rtrb is vulnerable to Double Free
38
Low Risk
ReadChunk::commit and ReadChunk::commit_all drop committed elements before advancing the consumer head. If an element's Drop implementation panics during that loop, the head is never updated, so the ring buffer still treats those slots as live. When the RingBuffer is later dropped, or a later read_chunk() / commit() touches the same slots, the already-dropped elements are dropped again, causing a double free or use-after-free that is reachable from safe Rust. The fix advances the consumer head so slots are not treated as live if a destructor panics.
You are affected if you are using a version that falls within the vulnerable range and you call ReadChunk::commit or ReadChunk::commit_all with elements whose Drop implementation can panic, then continue to use or drop the RingBuffer after catching the unwind. Types that never panic in Drop do not trigger this issue.
rtrb is vulnerable to Double Free in versions 0.1.0 - 0.3.4.
Upgrade the rtrb library to the patch version. Users on the 0.3.x line should prefer 0.3.5; 0.4.0 also contains the fix but changes is_abandoned() behavior.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.