CVE-2022-0559
📋 TL;DR
This is a use-after-free vulnerability in radare2, a popular reverse engineering framework. Attackers can exploit this to execute arbitrary code or cause denial of service by manipulating freed memory. Anyone using radare2 versions prior to 5.6.2 is 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.
Likely Case
Application crash (denial of service) or limited code execution within the radare2 process context.
If Mitigated
Application crash with no further impact if proper sandboxing/privilege separation is implemented.
🎯 Exploit Status
Exploitation requires feeding specially crafted input to radare2, which could be automated.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 5.6.2 and later
Vendor Advisory: https://github.com/radareorg/radare2/commit/b5cb90b28ec71fda3504da04e3cc94a362807f5e
Restart Required: No
Instructions:
1. Update radare2 to version 5.6.2 or later using your package manager or from source. 2. For package managers: 'sudo apt update && sudo apt upgrade radare2' (Debian/Ubuntu) or 'sudo yum update radare2' (RHEL/CentOS). 3. For source: git clone, checkout latest tag, build and install.
🔧 Temporary Workarounds
Restrict file processing
allLimit radare2 to trusted input sources only
Run with reduced privileges
linuxExecute radare2 with minimal user permissions
sudo -u nobody radare2 [file]
🧯 If You Can't Patch
- Isolate radare2 in a container or VM with no network access
- Implement strict input validation and only process trusted files
🔍 How to Verify
Check if Vulnerable:
Run 'r2 -v' and check if version is below 5.6.2
Check Version:
r2 -v | head -1
Verify Fix Applied:
Confirm version is 5.6.2 or higher with 'r2 -v'
📡 Detection & Monitoring
Log Indicators:
- Segmentation faults in radare2 process
- Unexpected memory access errors
Network Indicators:
- Unusual network connections from radare2 process
SIEM Query:
process_name:"radare2" AND (event_type:"crash" OR event_type:"segfault")
🔗 References
- https://github.com/radareorg/radare2/commit/b5cb90b28ec71fda3504da04e3cc94a362807f5e
- https://huntr.dev/bounties/aa80adb7-e900-44a5-ad05-91f3ccdfc81e
- 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/b5cb90b28ec71fda3504da04e3cc94a362807f5e
- https://huntr.dev/bounties/aa80adb7-e900-44a5-ad05-91f3ccdfc81e
- 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/