Closed Bug 928655 Opened 11 years ago Closed 11 years ago

dom::Exception::mThrownJSVal should get cleared in Unlink

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27
Tracking Status
firefox25 --- unaffected
firefox26 + fixed
firefox27 + fixed
firefox-esr17 --- unaffected
firefox-esr24 --- unaffected
b2g18 --- unaffected

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

(Keywords: regression, sec-high, Whiteboard: [qa-])

Attachments

(1 file)

I have no idea why this isn't showing up normally, but in bug 927601, I'm messing around with how XPCWNs are traced, and we start hitting the "Failed to unlink a JS object" assertion for Exception.  From manual inspection, this looks due to mThrownJSVal getting traced but not unlinked.
I'm also not sure it is a great idea to call DropJSObjects in StealJSVal, but I think preserved wrapper tracing for new DOM bindings objects is dealt with in a separate table than JSHolders, so it should be ok.
Comment on attachment 819376 [details] [diff] [review]
null it

[Security approval request comment]
How easily could an exploit be constructed based on the patch? Probably not too easily, it would require another bug to become an exploit.

Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem? Well, CC is involved, but not beyond that.

Which older supported branches are affected by this flaw? Aurora.

If not all supported branches, which bug introduced the flaw? bug 911258

Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be? Trivial.

How likely is this patch to cause regressions; how much testing does it need? Should be very safe.
Attachment #819376 - Flags: sec-approval?
Comment on attachment 819376 [details] [diff] [review]
null it

sec-approval+ for trunk. Assuming it goes well, please get an Aurora patch prepared before we fork in a week so we can get it fixed before it gets to Beta.
Attachment #819376 - Flags: sec-approval? → sec-approval+
Tree is closed right now, so marking checkin-needed in case I forget about this.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9b0f18ffd8f1
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Comment on attachment 819376 [details] [diff] [review]
null it

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 911258
User impact if declined: possible security problems
Testing completed (on m-c, etc.): it has been on m-c for a few days
Risk to taking this patch (and alternatives if risky): very low
String or IDL/UUID changes made by this patch: none
Attachment #819376 - Flags: approval-mozilla-aurora?
Attachment #819376 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Whiteboard: [qa-]
Group: core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: