Closed
Bug 638026
Opened 14 years ago
Closed 14 years ago
"ASSERTION: should have a JS object by this point" with setUserData, GC
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | - |
People
(Reporter: jruderman, Assigned: mrbkap)
References
Details
(Keywords: assertion, testcase, Whiteboard: [sg:nse] fixed-in-tracemonkey)
Attachments
(3 files)
1. Install 'DOM Fuzz Lite' from
https://www.squarefree.com/extensions/domFuzzLite.xpi
2. Load the testcase.
###!!! ASSERTION: should have a JS object by this point: 'win->GetOuterWindowInternal()->IsCreatingInnerWindow()', file dom/base/nsDOMClassInfo.cpp, line 5022
###!!! ASSERTION: Non-global object has the wrong flags: '!(jsclazz->flags & JSCLASS_IS_GLOBAL)', file js/src/xpconnect/src/xpcwrappednative.cpp, line 1153
Security-sensitive because I'm scared of anything that involves GC. Or inner and outer windows.
Reporter | ||
Comment 1•14 years ago
|
||
Reporter | ||
Updated•14 years ago
|
blocking2.0: --- → ?
Comment 2•14 years ago
|
||
This doesn't look exploitable. Why blocking?
Comment 3•14 years ago
|
||
b- please renom if we see any indication that this is indeed exploitable
blocking2.0: ? → -
Comment 4•14 years ago
|
||
Given that we don't know of this being exploitable or anything, marking this sg:nse, and keeping it closed for now. Blake, can you have a look?
Assignee: nobody → mrbkap
Whiteboard: [sg:nse]
Assignee | ||
Comment 5•14 years ago
|
||
So, the problem here is that the variant holds a reference to the outer window proxy and a reference to the current inner window's C++ object. After the iframe navigates, we brain transplant the outer window, and the old inner window's JS object has no more references to it, so we collect it. Later, we attempt to wrap the inner window into JS and recreate its JS object (and hit the assertion). This patch fixes this by making us hold a reference to the non-brain-transplanted inner object, meaning we won't recreate the JS object. This means we'll hold the old inner window alive longer, but I'm OK with that.
Attachment #517543 -
Flags: review?(jst)
Updated•14 years ago
|
Attachment #517543 -
Flags: review?(jst) → review+
Assignee | ||
Comment 6•14 years ago
|
||
Whiteboard: [sg:nse] → [sg:nse] fixed-in-tracemonkey
Comment 7•14 years ago
|
||
Blake: we don't have brain transplants on the 1.9.x branches, but we do have inner and outer windows and we have seen the assertions in comment 0 (bug 637226). Do we need a variant of this fix on branches? Maybe not if it's truly unexploitable.
Assignee | ||
Comment 8•14 years ago
|
||
No. On older branches, the variant ends up holding a strong reference to the outer window, not the inner and the jsval that it holds is also for the outer, so it won't be garbage collected. Because the value and the nsISupports match there is no bug.
Updated•14 years ago
|
Group: core-security
Assignee | ||
Comment 9•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•