CVE-2022-0713
📋 TL;DR
CVE-2022-0713 is a heap-based buffer overflow vulnerability in radare2 reverse engineering framework versions prior to 5.6.4. Attackers can exploit this by providing specially crafted input to cause memory corruption, potentially leading to arbitrary code execution. Users of radare2 for binary analysis or reverse engineering are affected.
💻 Affected Systems
- radare2
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
Radare2 by Radare
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with the privileges of the radare2 process, potentially leading to full system compromise if radare2 runs with elevated privileges.
Likely Case
Application crash (denial of service) or limited memory corruption leading to unstable behavior.
If Mitigated
Application crash without code execution if exploit fails or memory protections are in place.
🎯 Exploit Status
Exploit requires crafting specific input to trigger the buffer overflow. The vulnerability was discovered through bounty hunting and has public technical details.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 5.6.4
Vendor Advisory: https://github.com/radareorg/radare2/commit/a35f89f86ed12161af09330e92e5a213014e46a1
Restart Required: No
Instructions:
1. Update radare2 to version 5.6.4 or later. 2. For package managers: 'sudo apt update && sudo apt upgrade radare2' (Debian/Ubuntu) or 'sudo yum update radare2' (RHEL/CentOS). 3. For source builds: git pull from repository and rebuild.
🔧 Temporary Workarounds
Input validation
allOnly use radare2 with trusted input files and binaries
Sandbox execution
linuxRun radare2 in a container or sandboxed environment
docker run --rm -v $(pwd):/work radareorg/radare2:latest
🧯 If You Can't Patch
- Restrict radare2 usage to trusted users only
- Implement strict file validation before processing with radare2
🔍 How to Verify
Check if Vulnerable:
Check radare2 version with 'r2 -v' and verify it's below 5.6.4
Check Version:
r2 -v | grep -i version
Verify Fix Applied:
Confirm version is 5.6.4 or higher with 'r2 -v'
📡 Detection & Monitoring
Log Indicators:
- Radare2 process crashes with segmentation faults
- Abnormal memory usage patterns in radare2 processes
Network Indicators:
- Unusual network connections from radare2 processes if exploited
SIEM Query:
process_name:"r2" AND (event_type:"crash" OR memory_usage > threshold)
🔗 References
- https://github.com/radareorg/radare2/commit/a35f89f86ed12161af09330e92e5a213014e46a1
- https://huntr.dev/bounties/d35b3dff-768d-4a09-a742-c18ca8f56d3c
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BZTIMAS53YT66FUS4QHQAFRJOBMUFG6D/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/E6YBRQ3UCFWJVSOYIKPVUDASZ544TFND/
- https://github.com/radareorg/radare2/commit/a35f89f86ed12161af09330e92e5a213014e46a1
- https://huntr.dev/bounties/d35b3dff-768d-4a09-a742-c18ca8f56d3c
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BZTIMAS53YT66FUS4QHQAFRJOBMUFG6D/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/E6YBRQ3UCFWJVSOYIKPVUDASZ544TFND/