{"id":"RUSTSEC-2026-0274","revision":"a915aad8e0194e7d8e1fdee54e1f89ec","records":[{"revision":"a915aad8e0194e7d8e1fdee54e1f89ec","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0274","aliases":[],"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.","state":0,"publishedAt":"2026-08-04T12:00:00+00:00","modifiedAt":"2026-09-01T08:00:25.1849135+00:00","affected":[{"ecosystem":"crates.io","name":"rtrb","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"0.3.5"},{"kind":"introduced","version":"0.4.0-0"},{"kind":"fixed","version":"0.4.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://crates.io/crates/rtrb","https://rustsec.org/advisories/RUSTSEC-2026-0274.html","https://github.com/mgeier/rtrb/issues/185"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0274","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0274","identifiers":["RUSTSEC-2026-0274"]},"retained":false,"historicalAffected":[]}],"coverage":[]}