{"id":"RUSTSEC-2026-0292","aliases":["RUSTSEC-2026-0292"],"related":[],"kind":"vulnerability","state":"published","title":"Double free / use-after-free in `Chunk` and `InlineArray` removal methods when an element's `Drop` panics","summary":"`Chunk::{clear, drop_left, drop_right}` and `InlineArray::{clear, truncate}` drop the removed elements before updating the metadata that records which slots hold live values — the `left`/`right` index pair for `Chunk`, the length field for `InlineArray`. If an element's `Drop` panics during the drop, that update is never reached, so the collection still treats the already-dropped elements as live. When the collection is later dropped (its destructor walks the range described by the stale metadata), or a subsequent operation touches the same slots, those elements are dropped a second time — a double free (CWE-415) / use-after-free (CWE-416) reachable from safe Rust.\n\nThe stale field is `left` and `right` for `Chunk::clear`, `left` for `drop_left`, `right` for `drop_right`, and the length field for both `InlineArray` methods.\n\n## Mitigation\n\nUpgrade to `imbl-sized-chunks` 0.2.0 or later, which commits the metadata before dropping any element (fixed in jneem/imbl-sized-chunks#14, released in 0.2.0).","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"`Chunk::{clear, drop_left, drop_right}` and `InlineArray::{clear, truncate}` drop the removed elements before updating the metadata that records which slots hold live values — the `left`/`right` index pair for `Chunk`, the length field for `InlineArray`. If an element's `Drop` panics during the drop, that update is never reached, so the collection still treats the already-dropped elements as live. When the collection is later dropped (its destructor walks the range described by the stale metadata), or a subsequent operation touches the same slots, those elements are dropped a second time — a double free (CWE-415) / use-after-free (CWE-416) reachable from safe Rust.\n\nThe stale field is `left` and `right` for `Chunk::clear`, `left` for `drop_left`, `right` for `drop_right`, and the length field for both `InlineArray` methods.\n\n## Mitigation\n\nUpgrade to `imbl-sized-chunks` 0.2.0 or later, which commits the metadata before dropping any element (fixed in jneem/imbl-sized-chunks#14, released in 0.2.0).","format":"markdown","source":"rustsec"}],"published":"2026-09-04T12:00:00.000Z","modified":"2026-09-21T09:15:02.898Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.2.0"}],"ecosystem":"crates.io","package":"imbl-sized-chunks","purl":"pkg:cargo/imbl-sized-chunks","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/imbl-sized-chunks","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0292.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/jneem/imbl-sized-chunks/pull/14","tags":["web"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0292","url":"https://rustsec.org/advisories/RUSTSEC-2026-0292.html","licence":"CC0-1.0","modified":"2026-09-21T09:15:02.898Z"}],"updatedAt":"2026-11-25T22:56:43.410Z"}