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

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2023-06-26T12:00:00.000Z
- Modified: 2023-11-08T04:18:55.242Z
- Also known as: RUSTSEC-2023-0047

## 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](https://github.com/vhbit/lmdb-rs/issues/67).

(As written by GitHub Advisory Database.)

## Affected

- lmdb-rs (crates.io): up to 0.7.6; from 0.0.0-0

## References

- <https://github.com/vhbit/lmdb-rs/issues/67> (report, web)
- <https://github.com/vhbit/lmdb-rs> (package)
- <https://rustsec.org/advisories/RUSTSEC-2023-0047.html> (advisory, web)
- <https://crates.io/crates/lmdb-rs> (package)

## Sources

- GitHub Advisory Database: [GHSA-f9g6-fp84-fv92](https://github.com/advisories/GHSA-f9g6-fp84-fv92), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2023-0047](https://rustsec.org/advisories/RUSTSEC-2023-0047.html), CC0-1.0, modified 2023-11-08

---

Page: https://cve.day/GHSA-f9g6-fp84-fv92 · Whole record: https://cve.day/GHSA-f9g6-fp84-fv92.json · Rebuilt by cve.day 2026-11-25T22:56:43.151Z
