Rust advisories / rtrb
VulnerabilityRUSTSEC-2026-0274 · rtrb
RUSTSEC-2026-0274: Double free / use-after-free in `ReadChunk::commit` when an element's `Drop` panics
Short answerA security vulnerability in the rtrb crate: Double free / use-after-free in `ReadChunk::commit` when an element's `Drop` panics. No severity score was published. Fixed in 0.3.5, 0.4.0: update to a fixed version.
| Crate | rtrb |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | Before 0.3.5; from 0.4.0 before 0.4.0. |
| Fixed in | 0.3.5, 0.4.0 |
| Severity | not scored |
| Published | 2026-08-04 |
| Last changed | 2026-09-01 |
| Also known as | none |
| Affected functions | rtrb::chunks::ReadChunk::commit, rtrb::chunks::ReadChunk::commit_all |
What to do
- See which version you have:
cargo tree -i rtrb(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p rtrb. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplertrb = "0.4.0") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
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.
References
- Package: crates.io/crates/rtrb
- Advisory: rustsec.org/advisories/RUSTSEC-2026-0274.html
- Report: github.com/mgeier/rtrb/issues/185
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?