Intel

AIKIDO-2026-313880

stable-vec is vulnerable to Double Free

Double FreeGHSA-mr2v-63pc-gmr4 Published 3 days ago

56

Medium Risk

This Affects:

RUSTstable-vec
0.0.1 - 0.4.2
Fixed in 0.4.3
Are you affected? Scan for Free

TL;DR

The stable-vec crate relies on unsafe code in its core to manage element storage and dropping. Several methods do not stay memory-safe when an element's destructor panics, and related paths mishandle reborrowing, allocation sizes above isize::MAX, and cloning. When a drop (or clone) implementation panics, the crate can double-free memory, corrupt internal metadata, leak elements, or trigger heap overflows and other undefined behavior. The fix makes the drop, clear, extend, retain, and clone paths panic-safe and corrects the unsound reborrow and allocation-size handling.

Who does this affect?

You are affected if you use a version in the vulnerable range and store elements whose Drop or Clone implementation can panic (for example, user-supplied types with fallible destructors), so a panic during dropping or cloning can trigger the memory-safety fault.

Background info

stable-vec is vulnerable to Double Free in versions 0.0.1 - 0.4.2.

How to fix this

Upgrade the stable-vec library to the patch version.