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.
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.
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
- Create a RADIANCE .hdr file whose resolution line declares dimensions that overflow the size calculation.
- Open the file in Blender, either as a sequencer asset or by passing it as a command-line argument.
- Blender parses the dimensions and allocates an undersized buffer.
- 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.