GHSA-f9g6-fp84-fv92 impl `FromMdbValue` for bool is unsound

Not scored Published

Unsound bool conversion in lmdb-rs allows memory corruption and undefined behavior, potentially leading to code execution or crashes.

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

What is GHSA-f9g6-fp84-fv92?

GHSA-f9g6-fp84-fv92 is a memory corruption vulnerability in lmdb-rs, published on 26 Jun 2023.

Official description

The implementation of FromMdbValue has several unsoundness issues. First of all, it allows to reinterpret arbitrary bytes as a bool and could make undefined behavior happen with safe function. Secondly, it allows transmuting pointer without taking memory layout into consideration. The details of reproducing the bug are available here.

Which versions are affected by GHSA-f9g6-fp84-fv92?

3 open source packages ship an affected version, including lmdb-rs.

PackageAffectedFixed in
lmdb-rs crates.ioAll versions to 0.7.6None
lmdb-rs crates.ioAll versions to 0.7.6None
lmdb-rs crates.ioFrom 0.0.0-0None

How do I fix GHSA-f9g6-fp84-fv92?

No fix has been published for GHSA-f9g6-fp84-fv92 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is GHSA-f9g6-fp84-fv92 being exploited?

There is no known exploitation of GHSA-f9g6-fp84-fv92 in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2023-0047.

Is GHSA-f9g6-fp84-fv92 in your software?

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

Check your SBOMs for free