
Cloud Vulnerability DB
A community-led vulnerabilities database
The nano_arena crate before version 0.5.2 contains a vulnerability related to aliasing violations in the split_at function. The issue was discovered on March 1, 2021, where the function could create two mutable references to the same element if the Borrow trait implementation behaves in certain ways (RUSTSEC Advisory).
The vulnerability stems from the split_at function calling selected.borrow() twice - once to select a value from the arena and again to create the split. Since the Borrow trait is not required to return the same value on subsequent calls, this can lead to the creation of multiple mutable references to the same object, violating Rust's aliasing rules. The issue manifests when a custom implementation of the Borrow trait returns different indexes on consecutive calls (GitHub Issue).
When exploited, this vulnerability can result in undefined behavior through the creation of multiple mutable references to the same memory location. This can potentially lead to memory corruption, use-after-free conditions, or out-of-bounds writes in unsafe code (RUSTSEC Advisory).
The vulnerability can be triggered by implementing the Borrow trait in a way that returns different indexes on consecutive calls. A proof-of-concept exploit demonstrates the creation of two mutable references to the same memory location, which violates Rust's memory safety guarantees (GitHub Issue).
The issue has been fixed in version 0.5.2 of the nano_arena crate. Users are advised to upgrade to this version or later to resolve the vulnerability. If upgrading is not immediately possible, users should ensure their Borrow implementations consistently return the same index (RUSTSEC 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."