Skip to content
Memory corruption Advisory Advanced CVE-2017-2904

Blender Sequencer imb_loadhdr Integer Overflow Code Execution Vulnerability

A crafted RADIANCE .hdr image causes an integer overflow when Blender computes the image buffer size, leading to an undersized heap allocation. When the file is loaded through the sequencer, the decoded pixel data is written past the buffer, which can allow code execution in the context of the application.

A member Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable integer overflow exists in the RADIANCE loading functionality of the Blender open-source 3d creation suite version 2.78c. A specially crafted .hdr file can cause an integer overflow resulting in a buffer overflow which can allow for code execution under the context of the application.

a member, 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 width and height read from the file are multiplied without checking for overflow, so the result used for allocation is smaller than the data later written into it.

Impact

A crafted file could allow code execution under the context of the application, though the user must be convinced to load it as an asset.

What the attacker needed

Victim opens a crafted .hdr file; file loaded via sequencer or CLI

The fix

The text only recommends not using untrusted image files as an asset; it does not describe a code fix.

How it was found

  1. Create a RADIANCE .hdr file whose resolution line declares dimensions that overflow the size calculation.
  2. Open the file in Blender, either as a sequencer asset or by passing it as a command-line argument.
  3. Blender parses the dimensions and allocates an undersized buffer.
  4. While decoding the pixel data, Blender writes past the buffer, causing a heap overflow.

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.

An image file stores its own width and height, and the program multiplies these numbers to work out how much memory to reserve. If the numbers are huge, the multiplication wraps around to a small value, so too little memory is reserved, and the pixel data then spills over into neighbouring memory. An attacker who gets a victim to open such a file can potentially run their own code on the victim's machine.

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 A member

View all

110 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.