{"id":"RUSTSEC-2026-0274","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\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.","modified":"2026-09-01T08:00:25.184913524Z","published":"2026-08-04T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/rtrb"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0274.html"},{"type":"REPORT","url":"https://github.com/mgeier/rtrb/issues/185"}],"affected":[{"package":{"name":"rtrb","ecosystem":"crates.io","purl":"pkg:cargo/rtrb"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.3.5"},{"introduced":"0.4.0-0"},{"fixed":"0.4.0"}]}],"ecosystem_specific":{"affects":{"os":[],"functions":["rtrb::chunks::ReadChunk::commit","rtrb::chunks::ReadChunk::commit_all"],"arch":[]},"affected_functions":null},"database_specific":{"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0274.json","categories":["memory-corruption"],"cvss":null,"informational":null}}],"schema_version":"1.9.0"}