Hopper Disassembler ELF Section Header Size Code Execution Vulnerability
An out-of-bounds write vulnerability exists in Hopper Disassembler when parsing ELF section headers, where a user-controlled size value is not validated. An attacker can craft a malicious ELF file to cause attacker-controlled pointer arithmetic, leading to a partially controlled out-of-bounds write and potentially remote code execution.
Originally disclosed on Cisco Talos
An exploitable out of bounds write vulnerability exists in the parsing of ELF Section Headers of Hopper App. A specially crafted ELF file can cause attacker controlled pointer arithmetic resulting in a partially controlled out of bounds write.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the program reads a 64-bit size value from the ELF section header table and uses it without validation to calculate a pointer, leading to out-of-bounds access.
Impact
This could potentially lead to remote code execution.
What the attacker needed
Victim opens a crafted ELF file
The fix
The vulnerability was fixed by the vendor.
How it was found
- Craft an ELF file with a modified section header containing a large size value.
- Open the crafted ELF file in Hopper Disassembler.
- The program reads the size value and uses it in pointer arithmetic without validation.
- This causes an out-of-bounds access, leading to a crash or potential write.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Hopper is a program that analyses other programs. When it reads a file, it trusts a number in the file that says how big a part is. If that number is huge or wrong, Hopper writes data outside the memory it reserved, which can crash it or let an attacker run their own code.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.