On 1.9.2, using loadSubScript with a content object as the scope object is
On 1.9.2, the parent chain of XPCNativeWrapper/SJOW reaches to a content
window, thus the subscript can directly access content objects.
* An object created in the subscript is not a SJOW.
* When the scope object is an XPCNativeWrapper, "document" is not an XPCNativeWrapper.
window.toString() -> [object XPCNativeWrapper [object Window]]
window.document.toString() -> [object XPCNativeWrapper [object HTMLDocument]]
document.toString() -> [object HTMLDocument]
Created attachment 554841 [details]
Created attachment 554842 [details]
testcase - arbitrary code execution
This works in Firefox 3.6.20 (and 5, 6, 7 due to bug 653926).
Hopefully Firefox 7 and later are fixed by bug 653926 but setting it to track those releases to make sure.
mrbkap: is there anything in the fix for bug 653926 that can be applied to the 1.9.2 branch or do you have to come up with something else? Or is fixing it even possible?
qa, can we get help verifying that this is fixed for 7 and beyond? Please see previous comment.
moz_bug: Can you help QA with verification steps? I installed the extension but it is unclear what we are supposed to see. Thanks.
Steps to reproduce:
1. Install "test extension".
2. Load the testcase.
3. Click "test" button on the top of the browser's toolbox.
a) If the bug is not fixed, an alert dialog that shows Components.stack will
b) If the bug is fixed by bug 653926, the Error Console shows "Security Error:
Content at ... may not load or link to chrome:...".
Not tracking this for 7 any more. Marcia, can you get someone to verify this one? Thanks!
Mozilla/5.0 (Windows NT 5.1; rv:9.0a1) Gecko/20110920 Firefox/9.0a1,
Mozilla/5.0 (Windows NT 5.1; rv:8.0a2) Gecko/20110921 Firefox/8.0a2,
Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0 (Firefox Beta 6 build)
In all 3 builds I do not get the alert dialog, but I get Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.assign]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://lss-content-test2/content/sub.js :: <TOP_LEVEL> :: line 2" data: no] in the console. So this looks good from a verification perspective.
For 1.9.2 this should be fixed by bug 653926.
See bug 653926.
Based on the above comment, does it imply that this bug is a duplicate of 653926?
But 653926 has a different CVE id?
Ah, sorry i think i missed comment #10, for 1.9.2 the issue is fixed in bug 653926
verified on 8, 9 and 10