Skip to content
Memory corruption Advisory Advanced 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, leading to remote code execution.

Tyler Bohan Follow

Originally disclosed on Cisco Talos

High 8.1 View original

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.

Tyler Bohan, on Cisco Talos

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

The code allocates a buffer based on the smaller of tile and image dimensions but then reads multiple samples into it, writing past the allocated size.

What the attacker needed

Victim opens a crafted TIFF file; application uses Apple Image I/O API

How it was found

  1. Craft a TIFF image with a tile width larger than the image width and multiple samples per pixel.
  2. Open the TIFF in an application using Apple Image I/O, such as Preview or Safari.
  3. The application crashes due to heap corruption, and with further manipulation, code execution may be possible.

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.

A TIFF image is a file format for pictures. The code that reads these images made a mistake: it reserved too little memory for the image data and then copied more data than it had space for, overflowing into other memory. This can let an attacker run their own code on the device.

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.

More by Tyler Bohan

View all

84 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.