Skip to content

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

Unknown
Published
Updated
Exploit status
No public exploit known

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.

Upgrade path

1 package: 0 fixed, 1 partially fixed.

PackageAffectedFixed inStatus
crates.io lmdb-rs(crates.io) <= 0.7.6; >= 0.0.0-0 after 0.7.6 Partially fixed

Affected products

ProductAffected versionsFixed in
crates.io lmdb-rs(crates.io) <= 0.7.6 No fix listed
crates.io lmdb-rs(crates.io) >= 0.0.0-0 No fix listed

References