GHSA-f9g6-fp84-fv92: Lmdb rs Impl `FromMdbValue` For Bool Is Vulnerability
MODERATEGHSA-f9g6-fp84-fv92 is a MODERATE impl `frommdbvalue` for bool is vulnerability (General Security Weakness) affecting Lmdb rs libraries in the crates.io ecosystem. The issue involves impl `frommdbvalue` for bool is unsound. Remediation is available in the latest vendor maintenance releases.
GHSA-f9g6-fp84-fv92 at a Glance
How to Fix GHSA-f9g6-fp84-fv92
To remediate this vulnerability, upgrade all affected Lmdb rs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade lmdb-rs to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for lmdb-rs
How to Check if You Are Affected
To determine whether your application is affected by GHSA-f9g6-fp84-fv92, inspect your project dependencies for Lmdb rs:
inspect dependencies for lmdb-rs
Analyze the terminal output to locate any version of Lmdb rs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Lmdb rs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-f9g6-fp84-fv92 Affected Lmdb rs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lmdb-rs
|
crates.io |
≤ 0.7.6
|
|
References
Frequently Asked Questions
What is GHSA-f9g6-fp84-fv92?
Which Lmdb rs versions are affected?
What version fixes GHSA-f9g6-fp84-fv92?
Is lmdb-rs affected?
What CWE is associated with GHSA-f9g6-fp84-fv92?
How can I check crates.io dependencies for GHSA-f9g6-fp84-fv92?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f9g6-fp84-fv92",
"modified" : "2023-07-19T22:09:38Z",
"published" : "2023-07-19T22:09:38Z",
"aliases" : [ ],
"summary" : "impl `FromMdbValue` for bool is unsound",
"details" : "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).\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "lmdb-rs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.7.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vhbit/lmdb-rs/issues/67"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vhbit/lmdb-rs"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0047.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-19T22:09:38Z",
"nvd_published_at" : null
}
}