# RUSTSEC-2026-0029: Double-free and use-after-free for Hive

- Database: RustSec
- Published: 2026-02-26
- Modified: 2026-03-01

## Also published as

- [GHSA-J8CJ-HW74-64JV](https://cve.now/GHSA-J8CJ-HW74-64JV.md) (GitHub)

## Affected versions

- hivex (crates.io): fixed in 0.2.1

## Description

`Drop` implementation for `Hive` did perform free, but so did `Hive::close`, which,
at the end of the scope performed `Drop`, therefore triggering double-free.

Additionally, function `Hive::from_handle` was not marked as unsafe, making it,
in combination with `as_handle` easy to clone and trigger double-free in safe
code or triggering UB when using invalid pointer.

## References

- https://crates.io/crates/hivex
- https://rustsec.org/advisories/RUSTSEC-2026-0029.html
- https://codeberg.org/1millibyte/toolsnt/issues/18

Page: https://cve.now/RUSTSEC-2026-0029

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
