
Cloud Vulnerability DB
A community-led vulnerabilities database
RUSTSEC-2021-0086 (CVE-2021-45684) is a memory safety vulnerability discovered in the flumedb crate through version 2021-01-07 for Rust. The vulnerability involves potential reading from uninitialized memory locations in the read_entry function (RustSec Advisory).
The vulnerability exists in both go_offset_log::read_entry() and offset_log::read_entry() methods. These functions create an uninitialized buffer and pass it to a user-provided function F. This is unsound because it allows safe Rust code to exhibit undefined behavior by reading from uninitialized memory. The issue specifically occurs when creating a buffer using Vec::with_capacity() and setting its length using unsafe { buf.set_len() } before properly initializing the contents (GitHub Issue).
The vulnerability could lead to undefined behavior when reading from uninitialized memory locations. This could potentially result in memory corruption, information leaks, or other security-related issues in applications using the affected versions of the flumedb crate (RustSec Advisory).
The vulnerability can be triggered when using the read_entry functions with user-provided code that attempts to read from the uninitialized buffer. This is particularly concerning as it breaks Rust's memory safety guarantees in what appears to be safe code (GitHub Issue).
The recommended fix is to zero-initialize the newly allocated u8 buffer before calling read_at(), which prevents user-provided code from accessing uninitialized heap memory. Additionally, two nightly features are available for handling such cases: Initializer and read_buf (GitHub Issue).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."