CVE-2016-4631 APPLE IMAGE I/O API TILED TIFF REMOTE CODE EXECUTION VULNERABILITY
A heap-based buffer overflow exists in Apple's Image I/O API when parsing tiled TIFF images. An attacker could trigger it with a crafted TIFF file, potentially leading to remote code execution.
talosintelligence.com
Published on talosintelligence.com
An exploitable heap based buffer overflow exists in the handling of TIFF images on Apple OS X and iOS operating systems. A crafted TIFF document can lead to a heap based buffer overflow resulting in remote code execution.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code calculates the buffer size using the smaller of the tile dimensions and image dimensions, but then reads multiple samples into that buffer, each sample writing beyond the allocated size.
Impact
A crafted TIFF document could lead to remote code execution when opened in applications using the Apple Image I/O API, such as via a malicious web page, MMS, iMessage, or file attachment.
What the attacker needed
Victim opens a crafted TIFF file; application uses Apple Image I/O API
How it was found
- Craft a TIFF image with a tile width larger than the image width and multiple samples per pixel.
- Open the TIFF image in an application that uses Apple Image I/O, such as Preview or Safari.
- The application crashes due to heap corruption.
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 write-up has not been written yet. The Original tab links to the source.
A TIFF image is a file format for pictures. The code that reads these images made a mistake: it allocated a small memory buffer but then wrote more data into it than it could hold, overflowing into other memory. This can crash the program or, in the worst case, 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.