Blender BKE_vfont_to_curve_ex Integer Overflow Code Execution Vulnerability
An integer overflow in Blender's font-to-curve conversion can cause a heap buffer overflow when opening a crafted .blend file, potentially allowing code execution. An attacker can convince a user to open the file or use it as a library to trigger the vulnerability.
An exploitable integer overflow exists in the way that the Blender open-source 3d creation suite v2.78c converts text rendered as a font into a curve. 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.
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 application calculates the size of a buffer by adding 1 to a length value and multiplying by the size of a wide character without checking for integer overflow, leading to an undersized allocation.
Impact
This can lead to code execution under the context of the application.
What the attacker needed
Victim opens a crafted .blend file
The fix
It is recommended to not use untrusted .blend files in the application.
How it was found
- Create a .blend file with a Curve object of type OB_FONT and a large len_wchar value.
- Open the file in Blender, import it as a library, or pass it as a command-line argument.
- Blender updates the scene and calls the font-to-curve conversion.
- The integer overflow causes a small buffer allocation.
- The UTF-8 to wide-character conversion writes past the buffer, causing a crash or potential 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 is a 3D modelling program. When it loads a file, it converts text into a different format for display. A flaw in that conversion lets a malicious file trick the program into writing more data than it reserved space for, 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.