
Cloud Vulnerability DB
A community-led vulnerabilities database
A memory safety vulnerability was discovered in the bra-rs crate for Rust, identified as RUSTSEC-2021-0008. The vulnerability involves unsound implementation in the GreedyAccessReader::fill_buf method where uninitialized buffers are passed to user-provided Read implementations, potentially leading to undefined behavior (SSLAB Issue).
The vulnerability exists in the GreedyAccessReader::fill_buf method where it creates an uninitialized buffer and passes it to user-provided Read implementation (self.inner.read(buf)). This violates the safety requirements specified in the Read trait documentation, which explicitly states that it is the caller's responsibility to ensure the buffer is initialized before calling read. Using an uninitialized buffer can lead to undefined behavior in safe Rust code (SSLAB Issue).
The vulnerability could lead to undefined behavior in Rust programs using the affected crate, potentially causing memory safety issues and security vulnerabilities in applications that rely on this implementation (SSLAB Issue).
The issue affects version 0.1.0 of the bra crate and could be triggered when using the GreedyBufReader::fill_buf() functionality (SSLAB Issue).
The suggested fix involves zero-initializing the newly allocated u8 buffer before calling read(), which prevents user-provided Read implementations from reading old contents of the newly allocated heap memory (SSLAB 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."