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

Blender draw_new_particle_system PART_DRAW_AXIS Integer Overflow Code Execution Vulnerability

A crafted .blend file can make Blender compute a particle buffer size that overflows a 32-bit integer, so the heap allocation is too small. Writing particle axis data into that undersized buffer causes a heap-based buffer overflow that can lead to code execution as the user running Blender.

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 draws a Particle object. 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 particle draw code multiplies the particle and child counts by fixed factors in 32-bit arithmetic without checking for overflow, so the resulting allocation size is undersized.

Impact

Opening a malicious .blend file could allow code execution under the context of the application, though the report only demonstrates this on the 32-bit build.

What the attacker needed

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

The fix

The report does not describe a code fix; it recommends not opening untrusted .blend files.

How it was found

  1. Create a .blend file whose particle settings use the axis draw type and large particle counts.
  2. Open the file in Blender, import it as a library, or pass it on the command line.
  3. Blender draws the particle system and allocates an undersized buffer.
  4. The axis drawing code writes past the end of that buffer, causing a crash or 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 can open project files that describe 3D scenes, including particles. When it works out how much memory to reserve for drawing those particles, the maths can wrap around to a small number, so it reserves too little space and then writes past the end of it. That memory corruption can let an attacker run their own code on the victim's computer 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.