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

Blender Sequencer imb_get_anim_type Streams Integer Overflow Code Execution Vulnerability

Blender's AVI header parser multiplies the stream count by the size of a stream record without checking for integer overflow, so a crafted .avi file can cause an undersized heap allocation. The subsequent loop then writes past the buffer, which the advisory says can allow 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 animation playing functionality of the Blender open-source 3d creation suite version 2.78c. A specially created .avi 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 stream count read from the file is multiplied by the record size without an overflow check, so the allocation size wraps to a small value while the read loop still uses the original count.

Impact

A crafted .avi file could cause a heap-based buffer overflow that may allow code execution under the context of the application, though the user must open the file.

What the attacker needed

Victim opens a crafted .avi file; no account needed

The fix

The multiplication of the stream count by the record size should be checked for overflow before allocating, and the advisory recommends not using untrusted animation files as assets.

How it was found

  1. Create a crafted .avi file with the provided generator script.
  2. Open the file in Blender as an asset, or pass it to the executable with the -a option.
  3. Blender parses the AVI header and reads the stream count field.
  4. The stream count is multiplied by the record size and wraps, producing an undersized allocation.
  5. The loop reading stream records writes past the end of the buffer, causing a heap overflow.

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 a video file it reads a number from the file saying how many audio/video tracks it contains, then reserves memory for that many track records. If the number is huge, the multiplication used to work out the memory size wraps around to a small value, so Blender reserves too little space. It then copies the track data into that small space, overwriting neighbouring memory, which can crash Blender 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 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.