# RUSTSEC-2026-0274: Double free / use-after-free in `ReadChunk::commit` when an element's `Drop` panics

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-08-04T12:00:00.000Z
- Modified: 2026-09-01T08:00:25.184Z

## Description

`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.

(As written by RustSec Advisory Database.)

## Affected

- rtrb (crates.io): from 0.0.0-0 before 0.3.5; from 0.4.0-0 before 0.4.0

## References

- <https://crates.io/crates/rtrb> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0274.html> (advisory)
- <https://github.com/mgeier/rtrb/issues/185> (report)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0274](https://rustsec.org/advisories/RUSTSEC-2026-0274.html), CC0-1.0, modified 2026-09-01

---

Page: https://cve.day/RUSTSEC-2026-0274 · Whole record: https://cve.day/RUSTSEC-2026-0274.json · Rebuilt by cve.day 2026-11-25T22:56:43.404Z
