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

Blender mesh_calc_modifiers eModifierTypeType_OnlyDeform Integer Overflow Code Execution Vulnerability

A crafted .blend file can make Blender apply a deform-only modifier to a mesh whose vertex count causes an integer overflow when sizing a heap buffer, leading to a heap buffer overflow. An attacker who convinces a user to open the file, or uses it as a library, could achieve 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 way that the Blender open-source 3d creation suite v2.78c applies a particular object modifier to a Mesh. 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 size calculation multiplying the size of a three-float coordinate by the mesh vertex count is done in a 32-bit integer and can wrap around, so an undersized heap buffer is allocated before the vertex coordinates are copied in.

Impact

A heap-based buffer overflow could allow code execution under the context of the application, though the advisory only demonstrates a crash with controlled register values.

What the attacker needed

Victim opens a crafted .blend file; 32-bit build of Blender v2.78c

How it was found

  1. Create a .blend file with a mesh and a modifier whose type is deform-only, using the supplied generator.
  2. Open the crafted file in Blender, import it as a library, or pass it as a command-line argument.
  3. Blender updates the scene and reaches the deform modifier path, calling the vertex coordinate helper.
  4. The undersized buffer is allocated and the vertex copy writes past its end, crashing or allowing code execution.

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 is a 3D modelling program that opens project files. When it loads a project, it calculates how much memory is needed to hold the points of a 3D model. A maths mistake in that calculation makes the program reserve far too little memory, and then it writes past the end of that small space, which can let an attacker run their own code on the victim's computer.

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.