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

Blender vcol_to_fcol Integer Overflow Code Execution Vulnerability

A legacy Mesh colour attribute in a crafted .blend file is converted during load, and a large face count makes the size calculation overflow so a too-small buffer is allocated. The following loop then writes past that buffer, which can lead to code execution when the file is opened.

Cory Duplantis Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable integer overflow exists in the upgrade of a legacy Mesh attribute 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.

Cory Duplantis and 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 a 32-bit multiplication of the face count by the entry size without an overflow check, so a large face count yields a small buffer that the copy loop then overflows.

Impact

Opening a crafted file can corrupt the heap and potentially allow code execution under the context of the application.

What the attacker needed

Victim opens a crafted .blend file; file version must be 106 or lower; Mesh must have a valid mcol array

How it was found

  1. Create a .blend file with the provided generator script, giving the output filename as the argument.
  2. Run Blender with the generated file as its argument.
  3. The file's version check triggers the legacy colour conversion, which overflows the heap allocation.

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 opens an old file it upgrades some stored data. It works out how much memory to reserve by multiplying a number taken from the file, and a huge number makes that sum wrap around to a small value. The program then writes far more data than it reserved, corrupting memory, which an attacker can use to 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.

More by Cory Duplantis

View all

1 more disclosed report, 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.