CVE-2020-35711
📋 TL;DR
This vulnerability in the arc-swap Rust crate allows dangling references to be returned when using arc_swap::access::Map with the Constant test helper or custom Access trait implementations. This can lead to use-after-free conditions, potentially causing crashes or memory corruption. It affects Rust applications using vulnerable versions of the arc-swap crate.
💻 Affected Systems
- arc-swap Rust crate
📦 What is this software?
Arc Swap by Arc Swap Project
Arc Swap by Arc Swap Project
⚠️ Risk & Real-World Impact
Worst Case
Memory corruption leading to arbitrary code execution, denial of service, or data integrity compromise.
Likely Case
Application crashes, undefined behavior, or memory corruption resulting in denial of service.
If Mitigated
Limited impact if proper memory safety controls and sandboxing are implemented.
🎯 Exploit Status
Exploitation requires specific usage patterns and understanding of Rust memory management.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: arc-swap >=0.4.8, arc-swap >=1.1.0
Vendor Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0091.html
Restart Required: Yes
Instructions:
1. Update Cargo.toml to require arc-swap >=0.4.8 or >=1.1.0. 2. Run 'cargo update'. 3. Rebuild and redeploy application.
🔧 Temporary Workarounds
Avoid vulnerable patterns
allDo not use arc_swap::access::Map with Constant test helper or custom Access trait implementations.
🧯 If You Can't Patch
- Implement additional memory safety checks in application code
- Isolate affected components using sandboxing or containerization
🔍 How to Verify
Check if Vulnerable:
Check Cargo.lock or Cargo.toml for arc-swap version <0.4.8 or >=1.0.0 <1.1.0
Check Version:
grep arc-swap Cargo.lock
Verify Fix Applied:
Verify arc-swap version is >=0.4.8 or >=1.1.0 in Cargo.lock
📡 Detection & Monitoring
Log Indicators:
- Application crashes, segmentation faults, memory access violations
Network Indicators:
- Service unavailability or abnormal termination
SIEM Query:
Process termination events with exit codes indicating memory violations