{"id":"RUSTSEC-2026-0274","aliases":[],"status":"published","title":"Double free / use-after-free in `ReadChunk::commit` when an element's `Drop` panics","description":"`ReadChunk::commit` and `ReadChunk::commit_all` drop the committed elements\nbefore advancing the consumer head. If an element's `Drop` panics during the\ndrop loop, `head` is never advanced, so the ring buffer still treats those slots\nas holding live elements. When the `RingBuffer` is later dropped (it walks\n`head..tail` and drops each slot), or a subsequent `read_chunk()` / `commit()`\ntouches the same slots, the already-dropped elements are dropped a second time —\na double free (CWE-415) / use-after-free (CWE-416) reachable from safe Rust.\n\n## Mitigation\n\nUpdate to 0.3.5 (0.3.x line) or 0.4.0. Note that 0.4.0 contains a behavior\nchange in `is_abandoned()`, so users on 0.3.x should prefer 0.3.5.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2026-08-04T12:00:00Z","modified":"2026-09-01T08:00:25Z","fixes":[{"ecosystem":"crates.io","package":"rtrb","fixed_in":["0.3.5","0.4.0"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"crates.io","package":"rtrb","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.3.5"},{"introduced":"0.4.0-0"},{"fixed":"0.4.0"}]}]}],"references":[{"url":"https://crates.io/crates/rtrb","tags":["package"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0274.html","tags":["advisory"]},{"url":"https://github.com/mgeier/rtrb/issues/185","tags":["report"]}],"sources":{"osv":[{"id":"RUSTSEC-2026-0274","title":"Double free / use-after-free in `ReadChunk::commit` when an element's `Drop` panics","description":"`ReadChunk::commit` and `ReadChunk::commit_all` drop the committed elements\nbefore advancing the consumer head. If an element's `Drop` panics during the\ndrop loop, `head` is never advanced, so the ring buffer still treats those slots\nas holding live elements. When the `RingBuffer` is later dropped (it walks\n`head..tail` and drops each slot), or a subsequent `read_chunk()` / `commit()`\ntouches the same slots, the already-dropped elements are dropped a second time —\na double free (CWE-415) / use-after-free (CWE-416) reachable from safe Rust.\n\n## Mitigation\n\nUpdate to 0.3.5 (0.3.x line) or 0.4.0. Note that 0.4.0 contains a behavior\nchange in `is_abandoned()`, so users on 0.3.x should prefer 0.3.5.","status":"published","published":"2026-08-04T12:00:00Z","modified":"2026-09-01T08:00:25.184913524Z","updated_at":"2026-11-02T15:53:40.430679Z"}]}}
