A security issue has been found in dmg2img. fill_mishblk() does not check the length of the read buffer, and copies 0xCC bytes from it. The length of the buffer is controlled by an attacker. By providing a length smaller than 0xCC, memcpy reaches out of the malloc'ed bound. 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1959911 https://github.com/Lekensteyn/dmg2img/issues/11 https://github.com/Lekensteyn/dmg2img/files/5012219/heap-overflow-dmg2img-188.zip