Bug 2073949 (CVE-2022-1240)

Summary: CVE-2022-1240 radare2: heap buffer overflow in libr/bin/format/mach0/mach0.c
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: henrik, rebus
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: radare2 5.8.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-11 10:57:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2073955, 2073956    
Bug Blocks:    

Description Marian Rehak 2022-04-11 08:31:25 UTC
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).

Reference:

https://huntr.dev/bounties/e589bd97-4c74-4e79-93b5-0951a281facc
https://github.com/radareorg/radare2/commit/ca8d8b39f3e34a4fd943270330b80f1148129de4

Comment 1 Marian Rehak 2022-04-11 08:39:10 UTC
Created radare2 tracking bugs for this issue:

Affects: epel-all [bug 2073956]
Affects: fedora-all [bug 2073955]

Comment 2 Product Security DevOps Team 2022-04-11 10:57:11 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.