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

Blender Directory Browsing Thumbnail Viewer Integer Overflow Code Execution Vulnerability

A crafted .blend file can make Blender's thumbnail loader compute a thumbnail buffer size that overflows, so a smaller buffer than needed is allocated and thumbnail data is copied past its end. An attacker who gets a user to view thumbnails in the File->Open dialog could run code as that user.

A member Follow

Originally disclosed on Cisco Talos

High 7.5 View original

An exploitable integer overflow exists in the thumbnail functionality of the Blender open-source 3d creation suite version 2.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 size calculation multiplies two signed 32-bit values from the file without checking that the product fits, so the validation and the allocation both overflow and an undersized buffer is used.

Impact

A crafted file could cause a heap buffer overflow leading to code execution under the context of the application, though the attacker must convince the user to view thumbnails in the open dialog.

What the attacker needed

Victim opens File->Open dialog; thumbnails enabled in the dialog; attacker-supplied .blend file present

The fix

The size arithmetic should be checked so that an overflowing product is rejected before any allocation or copy is made; the text only recommends avoiding thumbnails as a workaround.

How it was found

  1. Generate a malicious .blend file with the supplied proof-of-concept generator.
  2. Open Blender's File->Open dialog and browse to the directory containing the file.
  3. Enable thumbnail viewing on the toolbar so the file's thumbnail is loaded.

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 shows a small preview picture (a thumbnail) for each project file in its open dialog. The program works out how much memory the picture needs by multiplying two numbers taken from the file, and those numbers can be chosen so the result wraps around to a tiny value. It then copies the picture data into that too-small space, which can corrupt memory and 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 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.