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.
{
"cwe_ids": [
"CWE-122"
],
"cna_assigner": "@huntrdev",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1240.json"
}{
"source": [
"CPE_RANGE",
"REFERENCES"
],
"cpe": "cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*",
"extracted_events": [
{
"introduced": "0"
},
{
"last_affected": "5.6.6"
}
]
}
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-1240.json"
[
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"161828278200281398868133491852319055833",
"205039608821184489972863283820120780378",
"243947348467918127835772681603744836927",
"124829447876606044522057134775873539834"
]
},
"target": {
"file": "libr/bin/format/mach0/mach0.c"
},
"source": "https://github.com/radareorg/radare2/commit/ca8d8b39f3e34a4fd943270330b80f1148129de4",
"signature_version": "v1",
"id": "CVE-2022-1240-fc1ba656",
"deprecated": false
}
]
"2026-08-12T12:59:06Z"