Out-of-bounds memory access due to blender-thumbnailer #99705

Closed
opened 2022-07-14 17:46:21 +02:00 by Sangjun Park · 10 comments

System Information
Operating system: Ubuntu 20.04.4 LTS
Graphics card: 2b:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1650 SUPER] (rev a1)

Blender Version
Broken: Blender 3.3.0 Alpha branch : master, commit c8a07ef663 commit Date: Thu Jul 14 11:32:01 2022 +0200

                               

Short description of error
A loaded (and valid) image can be crafted such that an out-of-bounds read or write occurs when the image converted to thumbnail that is flipped vertically.
Crash occured in
source/blender/blendthumb/src/blendthumb_extract.cc
that include memcpy()

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

Impact
An attacker-controlled out-of-bounds write/read can trigger code execution through convert this .blender file to thumbnail image using blender-thumbnailer

crash_final.blender

POC Videos is below
https://youtu.be/WN2t86t6m6k

POC blender file is below
https://drive.google.com/file/d/1pWe-t4LuirvgSdVaaaS1dle1trNWGPiw/view?usp=sharing

**System Information** Operating system: Ubuntu 20.04.4 LTS Graphics card: 2b:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1650 SUPER] (rev a1) **Blender Version** Broken: Blender 3.3.0 Alpha branch : master, commit c8a07ef66311a31cc45901717845139ae0682f2f commit Date: Thu Jul 14 11:32:01 2022 +0200 ``` ``` **Short description of error** A loaded (and valid) image can be crafted such that an out-of-bounds read or write occurs when the image converted to thumbnail that is flipped vertically. Crash occured in ```source/blender/blendthumb/src/blendthumb_extract.cc``` that include memcpy() **Exact steps for others to reproduce the error** Based on the default startup or an attached .blend file (as simple as possible). **Impact** An attacker-controlled out-of-bounds write/read can trigger code execution through convert this .blender file to thumbnail image using blender-thumbnailer [crash_final.blender](https://archive.blender.org/developer/F13292704/crash_final.blender) POC Videos is below https://youtu.be/WN2t86t6m6k POC blender file is below https://drive.google.com/file/d/1pWe-t4LuirvgSdVaaaS1dle1trNWGPiw/view?usp=sharing
Author

Added subscriber: @sangjun-park

Added subscriber: @sangjun-park
Author

Sorry for my mistake.

the crash_final.blender that i include to show proof of concept need to change extension name that .blend

but it doesn't matter extesion that reproduce Crash

but change file name
crash_final.blender ---> crash_final.blend

Sorry for my mistake. the crash_final.blender that i include to show proof of concept need to change extension name that .blend but it doesn't matter extesion that reproduce Crash but change file name ```crash_final.blender ---> crash_final.blend```

Added subscriber: @rjg

Added subscriber: @rjg
Ray molenkamp self-assigned this 2022-07-14 18:55:24 +02:00
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

This issue was referenced by 32df09b241

This issue was referenced by 32df09b2416a6961704eca0fe73534c8c4e715b2

This issue was referenced by b1329d7eaa

This issue was referenced by b1329d7eaa52a11c73b75d19d20bd8f6d11ac535
Ray molenkamp was unassigned by Sangjun Park 2022-07-14 20:37:03 +02:00
Author

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Author

It's amazing that they patched it so quickly.

Thanks.

Can i apply for a CVE number at https://cveform.mitre.org/ ???

It's amazing that they patched it so quickly. Thanks. Can i apply for a CVE number at https://cveform.mitre.org/ ???
Member

I'm not involved with mitre, so i couldn't tell you about their process. Community wise however if you're clever enough to find this kind of bug, you surely can provide a patch to fix it which actually would make blender better. Something to keep in mind for future reports.

I'm not involved with mitre, so i couldn't tell you about their process. Community wise however if you're clever enough to find this kind of bug, you surely can provide a patch to fix it which actually would make blender better. Something to keep in mind for future reports.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#99705
No description provided.