RUSTSEC-2026-0291 Double free in `OwnedAlloc::drop_in_place` when the contained value's `Drop` panics

Not scored Published

A double free and use-after-free vulnerability in OwnedAlloc allows attackers to cause memory corruption or crashes if a contained value's Drop implementation panics.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Not stated
Victim action needed
Not needed
Fix
None listed

What is RUSTSEC-2026-0291?

RUSTSEC-2026-0291 is an use after free vulnerability in owned-alloc, published on 9 Sep 2026.

Official description

OwnedAlloc::drop_in_place destroys the contained value by hand, then commits the ownership transfer with mem::forget(self) — which lives inside into_raw and so runs only after the destruction. T::drop is user code and may panic. If it does, the forget is skipped and the still-live OwnedAlloc unwinds, whose destructor drops the same T a second time and then deallocates. For a T that owns an allocation, the same block is freed twice — a double free (CWE-415). That destructor also reads the already-destroyed value through Layout::for_value before deallocating, a use-after-free (CWE-416).

MaybeUninitAlloc::drop_in_place delegates to the same function, so both public entry points are affected. Storing a value whose Drop can panic and calling either is enough — no unsafe on the caller's side.

Fix

No fixed release is available. The crate has had no release since 2018 and the maintainer has not responded to the report, nor to the one on lockfree, which is published from the same account. forget_inner leaks the value instead of destroying it, which is safe.

Which versions are affected by RUSTSEC-2026-0291?

1 open source package ship an affected version, including owned-alloc.

PackageAffectedFixed in
owned-alloc crates.ioFrom 0.0.0-0None

How do I fix RUSTSEC-2026-0291?

No fix has been published for RUSTSEC-2026-0291 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is RUSTSEC-2026-0291 being exploited?

There is no known exploitation of RUSTSEC-2026-0291 in the wild and no public exploit code.

Sources

Is RUSTSEC-2026-0291 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free