Closed Bug 967354 Opened 11 years ago Closed 11 years ago

WebGL: stack-buffer-underflow [@mozilla::detail::GuardObjectNotificationReceiver::GuardObjectNotificationReceiver]

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla30
Tracking Status
firefox27 --- wontfix
firefox28 --- wontfix
firefox29 + wontfix
firefox30 + verified
firefox-esr24 30+ verified
b2g-v1.2 --- fixed
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed
seamonkey2.26 --- unaffected

People

(Reporter: posidron, Assigned: u480271)

Details

(4 keywords, Whiteboard: [adv-main30+][adv-esr24.6+])

Attachments

(3 files, 1 obsolete file)

Attached file testcase (deleted) —
WebGL: copyTexImage2D: the maximum texture size for level 268435456 is 16384 The stack for the stack-buffer-underflow for an optimized build seems mangled. Tested with http://hg.mozilla.org/integration/mozilla-inbound/rev/53489b3e14f1
Attached file callstack (deleted) —
Haha, fun! Thanks!
Assignee: nobody → dglastonbury
Any updates on this security bug, Dan?
Flags: needinfo?(dglastonbury)
It's fixed in 966624, which I'm in the process of trying to get landed.
Flags: needinfo?(dglastonbury)
Fixed by Bug 966624.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
This is a sec-critical that affects Firefox 29. Does it go back further? We should get this backported to Aurora. Ideally, things that affect multiple versions and which are security issues get sec-approval+ before going in. https://wiki.mozilla.org/Security/Bug_Approval_Process
Flags: needinfo?(dglastonbury)
This likely goes back further, but we should check.
Matt, can you or someone else in QA check with older builds?
Flags: needinfo?(dglastonbury) → needinfo?(mwobensmith)
I tested the following, and they are all affected: * aurora * ff-esr24 * ff28
We should get this on Aurora, Beta, and ESR24.
Flags: needinfo?(mwobensmith)
I just found this again. Is there a reason we didn't backport this?
Flags: needinfo?(dglastonbury)
I tested Aurora debug and see no crash and the following in the console: "Error: WebGL: copyTexImage2D: for cube map, width must equal height" I noticed the reported crash stack was using ASAN so I'll recompile with ASAN and repeat the test.
Aurora: Ran with non-ASAN and ASAN debug builds. No stack underflow. JavaScript console contains: "Error: WebGL: copyTexImage2D: for cube map, width must equal height"
We are building our final FF29 build on Monday - this has to be able to land safely to the branch (will be on mozilla-release) before that build. Please get patches ready and tested by then.
OK we're past the time of safely landing this to branch with time to ensure it's not going to pose risk to quality/stability of the release. Since this is fixed in 30 we will see it go to GA at that time. We will need an ESR patch for this though - can someone prepare that and nominate for uplift?
Dan, ESR24 lives: http://hg.mozilla.org/releases/mozilla-esr24/, though you probably already used it.
Milan: I have already been working on a patch for ESR 24. I'll upload for review from Jeff.
Flags: needinfo?(dglastonbury)
Error checking in CopyTexImage2D appears to be incorrect. GetError() should be used instead. Updated all occurences where UpdateWebGLErrorAndClearGLError() appears to be used incorrectly.
Attachment #8409952 - Flags: review?(jgilbert)
Following discussion with Jeff on IRC, make CopyTexSubImage2D_base return bool for success. Check this result as well as for real GL errors.
Attachment #8410010 - Flags: review?(jgilbert)
Attachment #8409952 - Attachment is obsolete: true
Attachment #8409952 - Flags: review?(jgilbert)
Attachment #8410010 - Flags: review?(jgilbert) → review+
Dan - We're approaching the end of the latest ESR24 cycle. Can you confirm that the ESR24 patch is ready to land and, if so, land it ASAP?
Flags: needinfo?(dglastonbury)
(In reply to Lawrence Mandel [:lmandel] from comment #20) > Dan - We're approaching the end of the latest ESR24 cycle. Can you confirm > that the ESR24 patch is ready to land and, if so, land it ASAP? Given Jeff's r+, I believe it's ready to land. I'll check it still applies and refresh if necessary.
Flags: needinfo?(dglastonbury)
Comment on attachment 8410010 [details] [diff] [review] Fix incorrect usage of UpdateWebGLErrorAndClearGLError() [Approval Request Comment] If this is not a sec:{high,crit} bug, please state case for ESR consideration: User impact if declined: Ability to underflow stack by passing bad parameters to WebGL functions Fix Landed on Version: 966624 Risk to taking this patch (and alternatives if risky): Low risk. Patch adds checking for error code and doesn't call into OpenGL if there's an error. String or UUID changes made by this patch: See https://wiki.mozilla.org/Release_Management/ESR_Landing_Process for more info.
Attachment #8410010 - Flags: approval-mozilla-esr24?
Comment on attachment 8410010 [details] [diff] [review] Fix incorrect usage of UpdateWebGLErrorAndClearGLError() Review of attachment 8410010 [details] [diff] [review]: ----------------------------------------------------------------- ESR approval granted. Please land this week.
Attachment #8410010 - Flags: approval-mozilla-esr24? → approval-mozilla-esr24+
The patch from bug 966624 is going to need some serious rebasing for b2g28/b2g26/esr24.
Flags: needinfo?(dglastonbury)
Flags: needinfo?(dglastonbury)
Flags: needinfo?(dglastonbury)
Flags: in-testsuite?
Whiteboard: [adv-main30+][adv-esr24.6+]
Confirmed crash on 2014-02-11, Fx30. Verified fixed on release candidate builds of Fx24.6.0esr and Fx30.
Status: RESOLVED → VERIFIED
Ryan, I'll discuss it with :jgilbert.
Flags: needinfo?(dglastonbury)
I've checked the code and testcase with Aurora and Nightly and in those code bases, I introduced ValidateTexImage which errors and causes an early out in CopyTexImage2D so the bad value never reaches the driver, as was possible in ESR 24.
Per testcase, SeaMonkey 2.26 (based on gecko 29) is unaffected: o2 = document.createElement('canvas').getContext("webgl"); /* o2 == undefined */
Ryan - I don't see a commit comment for 1.3T or 1.4. You changed those flags. Can you confirm that this bug was fixed on those branches?
Flags: needinfo?(ryanvm)
It landed on trunk for mozilla30, hence v1.4. v1.3 merges to v1.3t daily, hence 1.3T.
Flags: needinfo?(ryanvm)
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #32) > It landed on trunk for mozilla30, hence v1.4. v1.3 merges to v1.3t daily, > hence 1.3T. Right. Missed that timing while looking at a large pile of bugs. Thanks.
Group: core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: