
Cloud Vulnerability DB
A community-led vulnerabilities database
RUSTSEC-2023-0074 is a vulnerability discovered in the Rust zerocopy crate affecting versions from 0.2.2 onwards. The vulnerability involves unsound implementations of Ref's methods (into_ref, into_mut, into_slice, and into_mut_slice) when used with specific Rust core cell types (GitHub Issue).
The vulnerability stems from insufficient lifetime guarantees in the implementation of Ref::into_ref and related methods. While the code requires the buffer type B to satisfy lifetime 'a, this proves insufficient when B is core::cell::Ref<[u8]> or core::cell::RefMut<[u8]>. The issue arises because these types only require the underlying RefCell to live for lifetime 'a, while the CoreRef itself may be dropped sooner, leading to potential undefined behavior (GitHub Issue).
When exploited, this vulnerability can lead to undefined behavior in Rust programs. The impact is demonstrated through proof-of-concept code that shows how the vulnerability allows mutation of memory while a reference to that memory is still considered valid, violating Rust's memory safety guarantees (GitHub Issue).
The issue has been fixed in version 0.7.32-1 and later releases. The fix implements a post-monomorphization check that causes code which could trigger this undefined behavior to fail compilation. The fix has been backported to all affected version trains, and affected versions have been yanked from the package registry (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."