Closed Bug 1523021 Opened 7 years ago Closed 7 years ago

Potential uninit variable read in release build when invariants violated in IntermLoop::GetChildNode

Categories

(Core :: Graphics, defect)

65 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mlfbrown, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

The issue is in TIntermLoop::getChildNode:
(https://dxr.mozilla.org/mozilla-central/source/gfx/angle/checkout/src/compiler/translator/IntermNode.cpp#232)

TIntermNode *children[4];  // uninitialized  
unsigned int childIndex = 0;

if (mInit) // check false
...
if (mCond) // check false
...
if (mExpr) // check false
...
if (mBody) // check false
...
ASSERT(index < childIndex); // assert compiled out in release build
return children[index]; // uninitialized memory 

This is only triggered when the invariant 'index < childIndex' is violated in release mode, so filing as a normal bug instead of security.

I don't know how to reproduce this issue as it's to technical for me.

Chris can you take a look at this, maybe you have a better idea on where to start on this?

Component: Untriaged → General
Flags: needinfo?(cpeterson)
Product: Firefox → Firefox Build System

Previous component was set by accident, waiting for Chris to answer or to set an appropriate component.

Component: General → Untriaged
Product: Firefox Build System → Firefox

(In reply to Fraser Brown from comment #0)

This is only triggered when the invariant 'index < childIndex' is violated in release mode, so filing as a normal bug instead of security.

Is this a compiler warning or a runtime assertion failure? What are the STR?

The file gfx/angle/checkout/src/compiler/translator/IntermNode.cpp is from the upstream ANGLE library:

https://chromium.googlesource.com/angle/angle/+/master/src/compiler/translator/IntermNode.cpp

Component: Untriaged → Graphics
Flags: needinfo?(cpeterson)
Product: Firefox → Core

Sorry, I completely missed this question. It's not a runtime failure, just a warning, so not even sure if important.

Thank you for the report.

As mentioned in the comment 3, this is an upstream issue, and should be fixed there.

Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.