Advisory

RUSTSEC-2026-0274

Also known as: None

Summary

Double free / use-after-free in ReadChunk::commit when an element's Drop panics

Details

ReadChunk::commit and ReadChunk::commit_all drop the committed elements
before advancing the consumer head. If an element's Drop panics during the
drop loop, head is never advanced, so the ring buffer still treats those slots
as holding live elements. When the RingBuffer is later dropped (it walks
head..tail and drops each slot), or a subsequent read_chunk() / commit()
touches the same slots, the already-dropped elements are dropped a second time —
a double free (CWE-415) / use-after-free (CWE-416) reachable from safe Rust.

Mitigation

Update to 0.3.5 (0.3.x line) or 0.4.0. Note that 0.4.0 contains a behavior
change in is_abandoned(), so users on 0.3.x should prefer 0.3.5.

Severity

Not rated by the source.

Dates

Published
2026-08-04 12:00 UTC
Modified
2026-09-01 08:00 UTC

Affected packages and fixes

rtrb

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.3.5, introduced 0.4.0-0, fixed 0.4.0 (semver)

Fixed versions

0.3.5, 0.4.0

Fix

  • Fixed version 0.3.5
    cargo update -p rtrb --precise 0.3.5
  • Fixed version 0.4.0
    cargo update -p rtrb --precise 0.4.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences