Email me

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.

Cratertrb
TypeVulnerability (memory-corruption)
Affected versionsBefore 0.3.5; from 0.4.0 before 0.4.0.
Fixed in0.3.5, 0.4.0
Severitynot scored
Published2026-08-04
Last changed2026-09-01
Also known asnone
Affected functionsrtrb::chunks::ReadChunk::commit, rtrb::chunks::ReadChunk::commit_all

What to do

  1. See which version you have: cargo tree -i rtrb (it also shows which of your dependencies pulls it in).
  2. 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 example rtrb = "0.4.0") or update the dependency that pulls it in.
  3. 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

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 →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ