
Cloud Vulnerability DB
A community-led vulnerabilities database
The vulnerability (GHSA-3mv5-343c-w2qg) affects the zerocopy Rust crate, specifically concerning the Ref methods into_ref, into_mut, into_slice, and into_slice_mut which are found to be unsound when used with cell::Ref or cell::RefMut. The issue was discovered and disclosed in December 2023, affecting multiple versions ranging from 0.2.2 through 0.7.30. The vulnerability has been patched in versions 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, and 0.7.31 (GitHub Advisory, RustSec Advisory).
The vulnerability stems from insufficient guarantees in the implementation of Ref methods. While the code requires the buffer type B to satisfy lifetime 'a (B: 'a), this proves inadequate when B is cell::Ref or cell::RefMut. The issue arises because CoreRef<[u8]>: 'a only requires the underlying RefCell to live for lifetime 'a, while the CoreRef itself may be dropped sooner. This creates a situation where the underlying memory can be mutated after the CoreRef is dropped, leading to undefined behavior (Google Issue).
The vulnerability allows safe code to exhibit undefined behavior when using specific Ref methods with cell::Ref or cell::RefMut. While the actual impact in production environments may be limited due to the specific conditions required to trigger the vulnerability, any code using these methods with the affected types could potentially experience memory safety issues (GitHub Advisory).
The issue has been fixed through a post-monomorphization check that causes code which would exhibit this undefined behavior to fail during compilation. The fix has been backported to all affected versions, resulting in new releases: 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, and 0.7.31. Users are advised to upgrade to these patched versions (GitHub Advisory).
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."