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

Blender modifier_mdef_compact_influences Integer Overflow Code Execution Vulnerability

An integer overflow in Blender's handling of old .blend files can cause a heap buffer overflow when loading a crafted file, potentially allowing code execution. An attacker can convince a user to open a malicious .blend file to trigger the vulnerability.

Cory Duplantis Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable integer overflow exists in the modifiermdefcompactinfluences 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.

Cory Duplantis, 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

Likely the allocation size is computed by multiplying a user-controlled influence count by the size of an influence structure without checking for integer overflow, so a large count wraps to a small allocation that is then overfilled.

Impact

A crafted .blend file could cause a heap-based buffer overflow, potentially leading to code execution under the context of the application.

What the attacker needed

Victim opens a malicious .blend file

How it was found

  1. Create a .blend file with a MeshDeform modifier containing a bindcos array and a crafted totinfluence value.
  2. Open the crafted .blend file in Blender or pass it as a command-line argument.
  3. Blender loads the file and calls blo_do_versions_250, which detects the old version and calls do_version_mdef_250.
  4. do_version_mdef_250 finds the MeshDeform modifier with bindcos and calls modifier_mdef_compact_influences.
  5. modifier_mdef_compact_influences allocates bindinfluences using the overflowing size and then writes beyond the 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 converts some data to a new format. A mistake in calculating how much memory to reserve for that data lets a malicious file trick Blender into writing past the reserved area, 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.

More by Cory Duplantis

View all

35 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.