dmg2img did not validate the size of the read buffer during memcpy() inside the main() function. This possibly leads to memory layout information leaking in the data. This might be used in a chain of vulnerability in order to reach code execution.
The vulnerability appears at the following code :
memcpy(parts[i].Data, base64data + 0xCC, parts[i].BlocksRunCount * 0x28);
An attacker could request a specially crafted DMG image to be converted by the dmg2img command. The attacker has the ability to control the size of the memcpy(), via `parts[i].BlocksRunCount` thus forcing an OOB read, and memory information to be written in the parts[i].Data allocation, or possibly crashing the command.
Upstream bug report :
Created dmg2img tracking bugs for this issue:
Affects: fedora-all [bug 1959587]
Name: Anshunkang Zhou
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.