CVE-2022-1240

Source
https://cve.org/CVERecord?id=CVE-2022-1240
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-1240.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-1240
Downstream
Related
Published
2022-04-06T10:15:15Z
Modified
2026-02-14T07:37:33.073875Z
Severity
  • 7.6 (High) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H CVSS Calculator
Summary
Heap buffer overflow in libr/bin/format/mach0/mach0.c in radareorg/radare2
Details

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.

Database specific
{
    "cna_assigner": "@huntrdev",
    "cwe_ids": [
        "CWE-122"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1240.json"
}
References

Affected packages

Git / github.com/radare/radare2

Affected ranges

Type
GIT
Repo
https://github.com/radare/radare2
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected

Affected versions

0.*
0.10.0
0.10.1
0.10.2
0.10.3
0.10.4
0.10.4-termux4
0.10.5
0.10.6
0.8.6
0.8.8
0.9
0.9.2
0.9.4
0.9.6
0.9.7
0.9.8
0.9.8-rc1
0.9.8-rc2
0.9.8-rc3
0.9.8-rc4
0.9.9
1.*
1.0
1.0.0
1.0.1
1.0.2
1.1.0
1.2.0
1.2.0-git
1.3.0
1.3.0-git
1.4.0
1.5.0
1.6.0
2.*
2.0.0
2.0.1
2.1.0
2.2.0
2.4.0
2.5.0
2.6.0
2.6.9
2.7.0
2.8.0
2.9.0
3.*
3.0.0
3.0.1
3.1.0
3.1.1
3.1.2
3.1.3
3.2.0
3.2.1
3.3.0
3.4.0
3.4.1
3.5.0
3.5.1
3.6.0
3.7.0
3.7.1
3.8.0
3.9.0
4.*
4.0.0
4.1.0
4.1.1
4.2.0
4.2.1
4.3.0
4.3.1
4.4.0
4.5.1
5.*
5.0.0
5.1.0
5.1.1
5.2.0
5.2.1
5.3.0
5.3.1
5.4.0
5.4.0-git
5.4.2
5.5.0
5.5.2
5.5.4
5.6.0
5.6.2
5.6.4
5.6.6
Other
Continuous-Windows
continuous
radare2-windows-nightly
termux
release-5.*
release-5.0.0

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-1240.json"

Git / github.com/radareorg/radare2

Affected ranges

Type
GIT
Repo
https://github.com/radareorg/radare2
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "fixed": "5.8.6"
        }
    ]
}

Affected versions

0.*
0.10.0
0.10.1
0.10.2
0.10.3
0.10.4
0.10.4-termux4
0.10.5
0.10.6
0.8.6
0.8.8
0.9
0.9.2
0.9.4
0.9.6
0.9.7
0.9.8
0.9.8-rc1
0.9.8-rc2
0.9.8-rc3
0.9.8-rc4
0.9.9
1.*
1.0
1.0.0
1.0.1
1.0.2
1.1.0
1.2.0
1.2.0-git
1.3.0
1.3.0-git
1.4.0
1.5.0
1.6.0
2.*
2.0.0
2.0.1
2.1.0
2.2.0
2.4.0
2.5.0
2.6.0
2.6.9
2.7.0
2.8.0
2.9.0
3.*
3.0.0
3.0.1
3.1.0
3.1.1
3.1.2
3.1.3
3.2.0
3.2.1
3.3.0
3.4.0
3.4.1
3.5.0
3.5.1
3.6.0
3.7.0
3.7.1
3.8.0
3.9.0
4.*
4.0.0
4.1.0
4.1.1
4.2.0
4.2.1
4.3.0
4.3.1
4.4.0
4.5.1
5.*
5.0.0
5.1.0
5.1.1
5.2.0
5.2.1
5.3.0
5.3.1
5.4.0
5.4.0-git
5.4.2
5.5.0
5.5.2
5.5.4
5.6.0
5.6.2
5.6.4
5.6.6
5.6.8
5.7.0
5.7.2
5.7.4
5.7.6
5.7.8
5.8.0
5.8.2
5.8.4
Other
Continuous-Windows
continuous
radare2-windows-nightly
termux
wip
release-5.*
release-5.0.0

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-1240.json"
vanir_signatures
[
    {
        "digest": {
            "function_hash": "145063074460943694343881143365853227954",
            "length": 2497.0
        },
        "signature_version": "v1",
        "target": {
            "file": "libr/main/r2pm.c",
            "function": "r2pm_setenv"
        },
        "signature_type": "Function",
        "id": "CVE-2022-1240-b84373c8",
        "source": "https://github.com/radareorg/radare2/commit/3c9ad151adf52658d814f56b9bb80bc9231da36b",
        "deprecated": false
    },
    {
        "digest": {
            "line_hashes": [
                "174233268195547535776550818523348433867",
                "110857393716508268641351500537619892142",
                "256171613986678726198978827673555401355",
                "39846773422299067065457741506509880629",
                "241005996178148118483357125520551727138",
                "7345371084092435429530051306604400430",
                "93665153460321992513043392253670786010",
                "107126595801987420493534474550200559584"
            ],
            "threshold": 0.9
        },
        "signature_version": "v1",
        "target": {
            "file": "libr/main/r2pm.c"
        },
        "signature_type": "Line",
        "id": "CVE-2022-1240-d50b7e62",
        "source": "https://github.com/radareorg/radare2/commit/3c9ad151adf52658d814f56b9bb80bc9231da36b",
        "deprecated": false
    }
]