Address Sanitizer reports read overrun in blender/windowmanager/intern/wm_operator_props.c #69469

Closed
opened 2019-09-04 02:59:56 +02:00 by Garry R. Osgood · 5 comments

System Information
Operating system: Linux bertha 5.2.0-gentoo-bertha #1 SMP Sat Jul 13 21:34:03 EDT 2019 x86_64 Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz GenuineIntel GNU/Linux
Graphics card: Radeon Pro WX 9100 (VEGA10, DRM 3.32.0, 5.2.0-gentoo-bertha, LLVM 7.1.0)

Blender Version
Broken: 2.81 (sub 5), Tue Sep 3 21:45:39 2019 +0200 commit 1af0f1fed9 HEAD -> master

Short description of error
Address Sanitizer reporting a read overrun of eight bytes of a buffer; aborts blender.
Exact steps for others to reproduce the error

  • Build a debug blender with Address Sanitizer enabled. i.e. 'make developer debug', specifically with cmake flag WITH_COMPILER_ASAN=ON
  • Run blender. Address Sanitizer aborts on startup

Run blender again. Now, preferably, in a debugger. See what's up (my notes on seeing what's up is below)

Blend file
Not triggered by a blend file - Can't get that far.
Address Sanitizer dump
adrsan.txt
Where the Plot Sickens
Stems from commit ee8f69c96c
Author: Julian Eisel eiseljulian@gmail.com
Date: Tue Sep 3 15:43:38 2019 +0200

With that commit, a static const EnumPropertyItem file_action_types- [ ] wm_operatorprops.c, line 81
lacking a terminating sentry record is defined and passed to RNA_def_enum(...) as an items buffer. See line 207, same file.
RNA_def_enum, failing to find the sentry record, reads past the buffer and Thus Offends The Address Sanitizer Gods.
To be picky, the overflow specifically takes place in rna_define.c:RNA_def_property_enum_items(...), called by RNA_def_enum(...)
See rna_define.c, line 1776

To keep RNA_def_property_enum_items(...) happy, methinks the enum file_action_type needs to be given a final sentry item filled with zero bytes. Template here:
rna_space.c line 419

@JulianEisel, could you take a look, please. Take care!

**System Information** Operating system: Linux bertha 5.2.0-gentoo-bertha #1 SMP Sat Jul 13 21:34:03 EDT 2019 x86_64 Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz GenuineIntel GNU/Linux Graphics card: Radeon Pro WX 9100 (VEGA10, DRM 3.32.0, 5.2.0-gentoo-bertha, LLVM 7.1.0) **Blender Version** Broken: 2.81 (sub 5), Tue Sep 3 21:45:39 2019 +0200 commit 1af0f1fed9a680df6cdde9c2b220b5ddc9bf03e0 HEAD -> master **Short description of error** Address Sanitizer reporting a read overrun of eight bytes of a buffer; aborts blender. **Exact steps for others to reproduce the error** - Build a debug blender with Address Sanitizer enabled. i.e. 'make developer debug', specifically with cmake flag WITH_COMPILER_ASAN=ON - Run blender. Address Sanitizer aborts on startup ## Run blender again. Now, preferably, in a debugger. See what's up (my notes on seeing what's up is below) **Blend file** Not triggered by a blend file - Can't get that far. **Address Sanitizer dump** [adrsan.txt](https://archive.blender.org/developer/F7715831/adrsan.txt) **Where the Plot Sickens** Stems from commit ee8f69c96cba62b083fb089432cddd0bce5d08e1 Author: Julian Eisel <eiseljulian@gmail.com> Date: Tue Sep 3 15:43:38 2019 +0200 With that commit, a static const EnumPropertyItem file_action_types- [ ] [wm_operatorprops.c, line 81](https://developer.blender.org/diffusion/B/browse/master/source/blender/windowmanager/intern/wm_operator_props.c) lacking a terminating sentry record is defined and passed to RNA_def_enum(...) as an items buffer. See line 207, same file. RNA_def_enum, failing to find the sentry record, reads past the buffer and Thus Offends The Address Sanitizer Gods. To be picky, the overflow specifically takes place in rna_define.c:RNA_def_property_enum_items(...), called by RNA_def_enum(...) See [rna_define.c, line 1776](https://developer.blender.org/diffusion/B/browse/master/source/blender/makesrna/intern/rna_define.c) To keep RNA_def_property_enum_items(...) happy, methinks the enum file_action_type needs to be given a final sentry item filled with zero bytes. Template here: [rna_space.c line 419](https://developer.blender.org/diffusion/B/browse/master/source/blender/makesrna/intern/rna_space.c) @JulianEisel, could you take a look, please. Take care!

Added subscribers: @JulianEisel, @grosgood

Added subscribers: @JulianEisel, @grosgood
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Julian Eisel was assigned by Ray molenkamp 2019-09-04 03:05:25 +02:00
Member

Can't repro, no asan on windows, but looking at the code the problem is definitively there.

Can't repro, no asan on windows, but looking at the code the problem is definitively there.

This issue was referenced by 718989d662

This issue was referenced by 718989d66216265afb140e9b1426b3ba36f4ebc3
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#69469
No description provided.