Blender Sequencer imb_bmp_decode Integer Overflow Code Execution Vulnerability
An integer overflow in Blender's BMP image loading for the video sequencer can cause a heap buffer overflow, allowing code execution when a crafted BMP file is used as an asset.
An exploitable integer overflow exists in the bmp loading functionality of the Blender open-source 3d creation suite version 2.78c. A specially crafted .bmp 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 product of width, height, and depth is computed in 32-bit arithmetic without overflow checking, leading to an undersized heap allocation.
Impact
An attacker could execute code under the context of the application if a user opens a crafted BMP file.
What the attacker needed
Victim opens a crafted BMP file; user interaction required
How it was found
- Create a malicious BMP file using the provided generator script.
- Open the BMP file as an asset in Blender's sequencer or pass it as a command-line argument to Blender.
- The application reads the BMP header and calculates an allocation size that overflows.
- The undersized buffer is allocated and then filled with pixel data, 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.
When Blender loads a BMP image, it calculates how much memory to reserve based on the image's width, height, and colour depth. If those numbers are huge, the multiplication can wrap around to a small value, so Blender reserves too little memory. Later, when it copies the image data into that small space, it writes past the end, which can crash the program or 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.