HistoryEditJSON (OSV)

RUSTSEC-2023-0047

impl FromMdbValue for bool is unsound

Reported
Issued
Package
lmdb-rs (crates.io)
Type
INFO Unsound
Keywords
#unsound
Aliases
References
Patched
no patched versions

Description

The implementation of FromMdbValue have 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 were included in url above.

Advisory available under CC0-1.0 license.