CVE-2020-35891
📋 TL;DR
This vulnerability in the Rust ordnung crate allows memory corruption through a double-free condition in the compact::Vec remove() function. Attackers could potentially execute arbitrary code or crash applications using this library. All Rust applications that depend on affected versions of the ordnung crate are vulnerable.
💻 Affected Systems
- Rust applications using the ordnung crate
📦 What is this software?
Ordnung by Ordnung Project
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or ransomware deployment.
Likely Case
Application crashes (denial of service) and potential memory corruption leading to data leakage.
If Mitigated
Contained crashes without privilege escalation if proper sandboxing and memory protections are in place.
🎯 Exploit Status
Exploitation requires triggering the vulnerable remove() function with specific conditions to cause double-free.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Update to ordnung crate version after 2020-09-03
Vendor Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0038.html
Restart Required: Yes
Instructions:
1. Update Cargo.toml to use ordnung crate version > 0.9.0
2. Run 'cargo update --package ordnung'
3. Rebuild and redeploy your application
4. Restart affected services
🔧 Temporary Workarounds
Avoid compact::Vec::remove()
allTemporarily avoid using the vulnerable remove() function on compact::Vec instances
// Code review to identify and avoid compact::Vec::remove() calls
🧯 If You Can't Patch
- Implement strict input validation to prevent triggering the vulnerable code path
- Deploy memory protection mechanisms like ASLR and DEP to reduce exploit impact
🔍 How to Verify
Check if Vulnerable:
Check Cargo.lock for ordnung crate version <= 0.9.0 or check dependencies with 'cargo tree | grep ordnung'
Check Version:
grep ordnung Cargo.lock | head -1
Verify Fix Applied:
Verify ordnung crate version > 0.9.0 in Cargo.lock and test application functionality
📡 Detection & Monitoring
Log Indicators:
- Application crashes with memory corruption errors
- Segmentation faults in Rust applications
Network Indicators:
- Unusual outbound connections following application crashes
SIEM Query:
source="application_logs" AND ("segmentation fault" OR "double free" OR "memory corruption") AND process="rust_app"