Closed
Bug 867482
Opened 10 years ago
Closed 10 years ago
Crash [@ js::types::Type::ObjectType] or [@ GetValueType] or Assertion failure: !val.isMagic(), at jsobj.cpp
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: gkw, Assigned: jandem)
Details
(4 keywords, Whiteboard: [adv-main22+][adv-esr1707+])
Crash Data
Attachments
(3 files)
6.63 KB,
text/plain
|
Details | |
2.73 KB,
patch
|
bhackett1024
:
review+
akeybl
:
approval-mozilla-aurora+
abillings
:
sec-approval+
|
Details | Diff | Splinter Review |
1.64 KB,
patch
|
jandem
:
review+
bajaj
:
approval-mozilla-esr17+
lsblakk
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
try { x = [] x.length = 7 Object.defineProperty(this, "y", { get: function() { return ([]).concat(x) } }) Array.prototype.unshift.call(x, x) } catch (e) {} y[8] Array.prototype.forEach.call(y, Array.indexOf) crashes js opt shell on m-c changeset 1150403342b2 with --no-baseline -a --no-ion at GetValueType and crashes js debug shell at js::types::Type::ObjectType s-s because scary memory address 0xfffb7fffffffffff is being accessed. This requires --no-baseline, and occurs when --no-baseline was first added as a shell flag, so autoBisect is unable to get an accurate bisection. The following variant does not crash js opt shell but asserts js debug shell at Assertion failure: !val.isMagic(), at jsobj.cpp : x = []; x.length = 7 Object.defineProperty(this, "y", { get: function() { return ([]).concat(x) } }); Array.prototype.unshift.call(x, x) y[1] = undefined Array.prototype.forEach.call(y, Array.indexOf)
![]() |
Reporter | |
Comment 1•10 years ago
|
||
Not sure if it's really JM at play here - cc'ing folks.
Flags: needinfo?(jdemooij)
Assignee | ||
Comment 2•10 years ago
|
||
JM bug but IonMonkey has the same problem. When we inline arr1.concat(arr2), the result array will have arr1's type. The problem is that if arr1 is known to be packed, and arr2 is not packed, the result may not be packed but its TypeObject will say it is. I can reproduce this crash on mozilla-beta too, so it's likely an old bug.
Assignee: general → jdemooij
Status: NEW → ASSIGNED
Attachment #744108 -
Flags: review?(bhackett1024)
Flags: needinfo?(jdemooij)
Assignee | ||
Updated•10 years ago
|
status-firefox20:
--- → affected
status-firefox21:
--- → affected
status-firefox22:
--- → affected
status-firefox23:
--- → affected
tracking-firefox21:
--- → ?
tracking-firefox22:
--- → ?
tracking-firefox23:
--- → ?
Updated•10 years ago
|
Attachment #744108 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 744108 [details] [diff] [review] Patch I *think* this is a (near-)NULL-dereference worst-case, and therefore not exploitable, but probably best to treat as critical just to be sure. [Security approval request comment] How easily could an exploit be constructed based on the patch? Not trivial, but shouldn't be too hard, especially with some fuzzing help. Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem? There are comments but somebody reading the code would basically get the same info. Which older supported branches are affected by this flaw? Release, aurora, beta. If not all supported branches, which bug introduced the flaw? Unknown, pretty sure it's an old bug. Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be? Should apply cleanly, or else very easy to backport. How likely is this patch to cause regressions; how much testing does it need? Unlikely.
Attachment #744108 -
Flags: sec-approval?
Updated•10 years ago
|
Keywords: sec-critical
Comment 4•10 years ago
|
||
Comment on attachment 744108 [details] [diff] [review] Patch sec-approval+. Please nominate this for branches.
Attachment #744108 -
Flags: sec-approval? → sec-approval+
Updated•10 years ago
|
Comment 5•10 years ago
|
||
Jandem,just wanted to make sure the patch is extremely safe & low risk enough to take into our final beta ? or should be reconsider the landing here based on comment# 3 which informs it may not be exploitable and this is already out there is Release.
Assignee | ||
Comment 6•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7c9e2aa0dd8a
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 744108 [details] [diff] [review] Patch (In reply to bhavana bajaj [:bajaj] from comment #5) > or should be reconsider the landing > here based on comment# 3 which informs it may not be exploitable and this is > already out there is Release. Yeah, I'm fine with taking this on aurora and not beta. [Approval Request Comment] Bug caused by (feature/regressing bug #): Unknown. User impact if declined: Crashes, correctness issues. Testing completed (on m-c, etc.): On mozilla-inbound Risk to taking this patch (and alternatives if risky): Low. String or IDL/UUID changes made by this patch: None.
Attachment #744108 -
Flags: approval-mozilla-aurora?
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7c9e2aa0dd8a
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Comment 9•10 years ago
|
||
ESR doesn't have IonMonkey and b2g18 has it turned off, but do we need the methodjit part of this patch on those older branches?
status-b2g18:
--- → ?
status-firefox-esr17:
--- → ?
tracking-b2g18:
--- → ?
tracking-firefox-esr17:
--- → ?
Updated•10 years ago
|
Updated•10 years ago
|
Attachment #744108 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 10•10 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #7) > Comment on attachment 744108 [details] [diff] [review] > Patch > > (In reply to bhavana bajaj [:bajaj] from comment #5) > > or should be reconsider the landing > > here based on comment# 3 which informs it may not be exploitable and this is > > already out there is Release. > > Yeah, I'm fine with taking this on aurora and not beta. wontfixing for Fx21 based on above. > > [Approval Request Comment] > Bug caused by (feature/regressing bug #): Unknown. > User impact if declined: Crashes, correctness issues. > Testing completed (on m-c, etc.): On mozilla-inbound > Risk to taking this patch (and alternatives if risky): Low. > String or IDL/UUID changes made by this patch: None.
Updated•10 years ago
|
Status: RESOLVED → VERIFIED
Crash Signature: [@ js::types::Type::ObjectType]
[@ GetValueType] → [@ js::types::Type::ObjectType]
[@ GetValueType]
Comment 12•10 years ago
|
||
JSBugMon: This bug has been automatically verified fixed.
Comment 13•10 years ago
|
||
NI? see comment 9's question for b2g18 and esr17
Crash Signature: [@ js::types::Type::ObjectType]
[@ GetValueType] → [@ js::types::Type::ObjectType]
[@ GetValueType]
Flags: needinfo?(jdemooij)
Updated•10 years ago
|
Assignee | ||
Comment 14•10 years ago
|
||
I couldn't reproduce the crash on esr17/b2g18 with the tests in comment 0, because forEach is not self-hosted there. The test below crashes esr17/b2g18 though with -m -n -a and I verified this patch fixes the crash. function ArrayForEach(callbackfn ) { var O = this; var len = (O.length >>> 0); for (var k = 0; k < len; k++) { if (k in O) O[k].toString(); } } try { x = [] x.length = 7 Object.defineProperty(this, "y", { get: function() { return ([]).concat(x) } }) Array.prototype.unshift.call(x, x) } catch (e) {} y[8] ArrayForEach.call(y, Array.indexOf)
Attachment #747079 -
Flags: review+
Flags: needinfo?(jdemooij)
Assignee | ||
Comment 15•10 years ago
|
||
Comment on attachment 747079 [details] [diff] [review] Patch for esr17 and b2g18 NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): JM User impact if declined: Crashes. Testing completed: On m-c for almost a week. Risk to taking this patch (and alternatives if risky): Very low. String or UUID changes made by this patch: None. [Approval Request Comment] If this is not a sec:{high,crit} bug, please state case for ESR consideration: near-NULL crashes, as far as we know not exploitable. User impact if declined: crashes Fix Landed on Version: 23 (last week) Risk to taking this patch (and alternatives if risky): Low. String or UUID changes made by this patch: None. See https://wiki.mozilla.org/Release_Management/ESR_Landing_Process for more info.
Attachment #747079 -
Flags: approval-mozilla-esr17?
Attachment #747079 -
Flags: approval-mozilla-b2g18?
Updated•10 years ago
|
Comment 16•10 years ago
|
||
Comment on attachment 747079 [details] [diff] [review] Patch for esr17 and b2g18 Approved for b2g18 but we'll wait until after 5/14 to approve on esr17 that will ship with FF22.
Attachment #747079 -
Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Comment 17•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/8eac2429297c
status-b2g18-v1.0.0:
--- → wontfix
status-b2g18-v1.0.1:
--- → affected
Assignee | ||
Comment 18•10 years ago
|
||
It turns out this bug is responsible for a topcrasher on Outlook.com with certain email accounts (bug 851934). Whether the browser crashes or not depends on your contact list; Firefox becomes unusable if you happen to have a "bad" Outlook.com account (it will crash every time you reply to an email etc). So considering this bug affects real-world websites and causes top crashes, do we want to revisit our decision to not land this on beta? The patch is small and pretty safe (it disables an optimization in some cases), has been on m-c for more than a week and has been confirmed to fix the bug (bug 851934 comment 59). Requesting needinfo? from release management.
Flags: needinfo?(bbajaj)
Flags: needinfo?(akeybl)
![]() |
||
Comment 19•10 years ago
|
||
Well, we already have built the final 21.0 beta and release builds (modulo any extremely-high issues we'd do a last-minute respin for). A week ago, there would have been some wiggle room for a high-value fix (as this is on the condition of fixing bug 851934), but now we're probably past that. Though this is also a sec-crit, so if the worst case happens, it's exploitable, the aurora patch enables people to paint a bulls-eye on the problem and notice it via outlook.com crashing, we could end up with a 0-day and chemspill - so that eventuality (next to the high-volume crasher) might still give it some leverage for taking in a respin.
![]() |
||
Comment 20•10 years ago
|
||
Oh, on the sec-crit status - I just looked into a few crashes from bug 851934 and on all of them the breakpad tool gives them an exploitability rating of "none" so the automatic analysis says those (probably) can't be exploited.
Assignee | ||
Comment 21•10 years ago
|
||
(In reply to Robert Kaiser (:kairo@mozilla.com) from comment #19) > Though this is also a sec-crit, so if the worst case happens, it's > exploitable, the aurora patch enables people to paint a bulls-eye on the > problem and notice it via outlook.com crashing No it's not sec-critical. I wasn't sure about it when I wrote comment 3, but I can't think of any way to exploit this and that's also why we didn't take it on beta.
Keywords: sec-critical
![]() |
||
Comment 22•10 years ago
|
||
I wonder if this does even need to be a hidden security bug, given what we know now. Jan, what do you think?
Comment 23•10 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #18) > It turns out this bug is responsible for a topcrasher on Outlook.com with > certain email accounts (bug 851934). Whether the browser crashes or not > depends on your contact list; Firefox becomes unusable if you happen to have > a "bad" Outlook.com account (it will crash every time you reply to an email > etc). > > So considering this bug affects real-world websites and causes top crashes, > do we want to revisit our decision to not land this on beta? The patch is > small and pretty safe (it disables an optimization in some cases), has been > on m-c for more than a week and has been confirmed to fix the bug (bug > 851934 comment 59). Hrm, given we may not have any more beta's for Fx21, is this safe enough to land on release-branch directly ? This means we will not get any beta testing and will be landing our fix directly for release audience.How confident are we that we will see no fallout's once this lands on Fx21 code ? For everyone's context ,the reason that we did not take this in last beta was because we did not know that it had any relation to the top-crasher & based on discussion in comment #7 . > > Requesting needinfo? from release management.
Flags: needinfo?(bbajaj)
Updated•10 years ago
|
Flags: needinfo?(akeybl)
Keywords: sec-moderate
Updated•10 years ago
|
Flags: needinfo?(jdemooij)
Assignee | ||
Comment 24•10 years ago
|
||
(In reply to bhavana bajaj [:bajaj] from comment #23) > Hrm, given we may not have any more beta's for Fx21, is this safe enough to > land on release-branch directly ? This means we will not get any beta > testing and will be landing our fix directly for release audience.How > confident are we that we will see no fallout's once this lands on Fx21 code > ? I'm very confident, also because this has been on m-c for over a week without any problems. As with any code change it's hard to be 100% sure though, but considering it fixes the crash it's probably worth it..
Flags: needinfo?(jdemooij)
Comment 25•10 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #24) > (In reply to bhavana bajaj [:bajaj] from comment #23) > > Hrm, given we may not have any more beta's for Fx21, is this safe enough to > > land on release-branch directly ? This means we will not get any beta > > testing and will be landing our fix directly for release audience.How > > confident are we that we will see no fallout's once this lands on Fx21 code > > ? > > I'm very confident, also because this has been on m-c for over a week > without any problems. As with any code change it's hard to be 100% sure > though, but considering it fixes the crash it's probably worth it.. Thanks Jandem. I discussed this with Alex and both us believe that this fix needs to be on a beta and not something we can take on release directly.So although this is really worthy, it is just too late for Fx21.0 keeping in mind the general risk of regression with code change and to avoid surprises directly in our release build.
Assignee | ||
Comment 26•10 years ago
|
||
(In reply to bhavana bajaj [:bajaj] from comment #25) > Thanks Jandem. I discussed this with Alex and both us believe that this fix > needs to be on a beta and not something we can take on release directly.So > although this is really worthy, it is just too late for Fx21.0 keeping in > mind the general risk of regression with code change and to avoid surprises > directly in our release build. Sure, that makes sense. Thanks!
![]() |
||
Comment 27•10 years ago
|
||
I'm setting this back to affected for 21 in case we do a point release and might want to have this as a ride-along to fix the high-ranking outlook.com crash (bug 851934).
Updated•10 years ago
|
Attachment #747079 -
Flags: approval-mozilla-esr17? → approval-mozilla-esr17+
Updated•10 years ago
|
Keywords: checkin-needed
Updated•10 years ago
|
Whiteboard: [adv-main22+][adv-esr1707+]
Comment 29•10 years ago
|
||
Marking status-firefox23:verified based on comment 12.
Updated•9 years ago
|
Group: core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•