CVE-2022-1240 Heap buffer overflow in libr/bin/format/mach0/mach0.c in radareorg/radare2
A heap buffer overflow in radare2 allows attackers to execute arbitrary code or cause a denial of service via crafted Mach-O binaries.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-1240?
CVE-2022-1240 is a high-severity memory corruption vulnerability in Radare Radare2, published on 6 Apr 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Heap buffer overflow in libr/bin/format/mach0/mach0.c in GitHub repository radareorg/radare2 prior to 5.8.6. If address sanitizer is disabled during the compiling, the program should executes into the `r_str_ncpy` function. Therefore I think it is very likely to be exploitable. For more general description of heap buffer overflow, see [CWE](https://cwe.mitre.org/data/definitions/122.html).
Which versions are affected by CVE-2022-1240?
It affects 1 product.
Products include Radare Radare2.
How do I fix CVE-2022-1240?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2022-1240 being exploited?
There is no known exploitation of CVE-2022-1240 in the wild and no public exploit code.
Other vulnerabilities in Radare Radare2
Sources
Also known as GHSA-m6g3-mrp2-c625, UBUNTU-CVE-2022-1240.