Unratedcrates.ioPublished
Hive has Double-free and Use After Free Vulnerabilities
GHSA-j8cj-hw74-64jv
- Affected
- crates.io hivex >= 0.2.0, <= 0.2.0
- Fixed in
- 0.2.1· Vendor fix available
- Issue
- 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::fromhandle was not marked as unsafe, making it, in combination with ashandle easy to clone and trigger double-free in safe code or triggering UB when using invalid pointer.
Recommended action: Upgrade to 0.2.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.