# GHSA-8gw6-724c-9h38: Use-after-free when a future's `Drop` panics while the container is dropped

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-09-12T12:00:00.000Z
- Modified: 2026-09-22T07:45:03.895Z
- Also known as: RUSTSEC-2026-0298

## Description

`Storage::clear` walks the slab, empties each entry and frees the `Task`
allocation once its reference count reaches zero. `self.tasks.set_len(0)` only
runs after the loop.

Emptying an entry drops the user future it holds, and `T` carries no bounds
excluding a panicking `Drop`. If one unwinds, the length is never committed and
`self.tasks` still holds the pointers already processed. `Drop for Storage`
calls `clear` again, and the second pass dereferences `(*task.as_ptr()).entry`
on allocations the first pass already freed — a use-after-free (CWE-416)
reachable from safe Rust.

`Storage` is reached only through `Unordered`, whose `Drop` calls `clear`. No
particular method call is needed; dropping the container is enough.

## Mitigation

Update to 0.10.3.

(As written by RustSec Advisory Database.)

## Affected

- unicycle (crates.io): from 0.0.0-0 before 0.10.3

## References

- <https://crates.io/crates/unicycle> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0298.html> (advisory)
- <https://github.com/udoprog/unicycle/commit/4f1492a266824f8aa66fd6b27fa6188bf826bdfd> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0298](https://rustsec.org/advisories/RUSTSEC-2026-0298.html), CC0-1.0, modified 2026-09-22

---

Page: https://cve.day/GHSA-8gw6-724c-9h38 · Whole record: https://cve.day/GHSA-8gw6-724c-9h38.json · Rebuilt by cve.day 2026-11-25T22:56:43.412Z
