{"id":"GHSA-8gw6-724c-9h38","aliases":["GHSA-8gw6-724c-9h38","RUSTSEC-2026-0298"],"related":[],"kind":"vulnerability","state":"published","title":"Use-after-free when a future's `Drop` panics while the container is dropped","summary":"`Storage::clear` walks the slab, empties each entry and frees the `Task`\nallocation once its reference count reaches zero. `self.tasks.set_len(0)` only\nruns after the loop.\n\nEmptying an entry drops the user future it holds, and `T` carries no bounds\nexcluding a panicking `Drop`. If one unwinds, the length is never committed and\n`self.tasks` still holds the pointers already processed. `Drop for Storage`\ncalls `clear` again, and the second pass dereferences `(*task.as_ptr()).entry`\non allocations the first pass already freed — a use-after-free (CWE-416)\nreachable from safe Rust.\n\n`Storage` is reached only through `Unordered`, whose `Drop` calls `clear`. No\nparticular method call is needed; dropping the container is enough.\n\n## Mitigation\n\nUpdate to 0.10.3.","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"`Storage::clear` walks the slab, empties each entry and frees the `Task`\nallocation once its reference count reaches zero. `self.tasks.set_len(0)` only\nruns after the loop.\n\nEmptying an entry drops the user future it holds, and `T` carries no bounds\nexcluding a panicking `Drop`. If one unwinds, the length is never committed and\n`self.tasks` still holds the pointers already processed. `Drop for Storage`\ncalls `clear` again, and the second pass dereferences `(*task.as_ptr()).entry`\non allocations the first pass already freed — a use-after-free (CWE-416)\nreachable from safe Rust.\n\n`Storage` is reached only through `Unordered`, whose `Drop` calls `clear`. No\nparticular method call is needed; dropping the container is enough.\n\n## Mitigation\n\nUpdate to 0.10.3.","format":"markdown","source":"rustsec"}],"published":"2026-09-12T12:00:00.000Z","modified":"2026-09-22T07:45:03.895Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.10.3"}],"ecosystem":"crates.io","package":"unicycle","purl":"pkg:cargo/unicycle","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/unicycle","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0298.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/udoprog/unicycle/commit/4f1492a266824f8aa66fd6b27fa6188bf826bdfd","tags":["web"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0298","url":"https://rustsec.org/advisories/RUSTSEC-2026-0298.html","licence":"CC0-1.0","modified":"2026-09-22T07:45:03.895Z"}],"updatedAt":"2026-11-25T22:56:43.412Z"}