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

Blender multires_load_old_dm base vertex map Integer Overflow Code Execution Vulnerability

A crafted .blend file with an old multires mesh structure causes an integer overflow when Blender calculates the size of a vertex map buffer, leading to a heap buffer overflow. An attacker who convinces a user to open the file could execute code 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 multiresloadolddm functionality of the Blender open-source 3d creation suite v2.78c. A specially crafted .blend 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 allocation size is computed as sizeof(int) times a vertex count without checking for 32-bit overflow, so the buffer is undersized and the subsequent initialisation loop writes out of bounds.

Impact

A heap-based out-of-bounds write could allow code execution under the context of the application, though the report only demonstrates a crash in the 32-bit build.

What the attacker needed

Victim opens a malicious .blend file; 32-bit Blender build

How it was found

  1. Create a .blend file with an old multires mesh structure using the provided generator.
  2. Open the file in Blender, use it as a library, or pass it as a command-line argument.
  3. Blender runs the version-upgrade code and calls the old multires loading routine.
  4. The vertex map allocation overflows and the initialisation loop writes past the buffer.

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.

Blender can open project files made by older versions and converts them to the new format. When it does this for a certain mesh feature, it multiplies a vertex count by four to decide how much memory to reserve, but the number can wrap around and become tiny. The program then writes more data than fits, corrupting memory, which an attacker can use to run their own code if the victim opens a malicious file.

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.