Skip to content
Memory corruption Advisory Advanced CVE-2016-4629

Apple Image I/O EXR Color Component Remote Code Execution Vulnerability

A heap-based buffer overflow exists in Apple's Image I/O handling of EXR images due to unsanitised user-controlled stride values, leading to an out-of-bounds write. An attacker could potentially achieve remote code execution by delivering a crafted EXR file that is opened in any application using the Image I/O API.

Tyler Bohan Follow

Originally disclosed on Cisco Talos

Medium 6.4 View original

An exploitable heap based buffer overflow exists in the handling of EXR images on OS X. A crafted EXR 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

Likely the stride values (xStride and yStride) from the EXR file are not validated and are used in pointer arithmetic without proper bounds checking, allowing sign extension to produce out-of-bounds addresses.

Impact

A crafted EXR file could cause a heap-based buffer overflow, potentially leading to remote code execution and giving an attacker full control, though the CVSS score indicates high attack complexity and user interaction is required.

What the attacker needed

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

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.

When an image is opened, the program reads its pixel data into memory. In this case, the program trusted some numbers in the file that control where to write each pixel, and those numbers could be made negative, causing writes far outside the intended memory area. This can crash the program and, with careful crafting, may 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.

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.