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

RESOLVED FIXED in Firefox 26

Status

()

Core
XPConnect
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: mccr8, Assigned: mccr8)

Tracking

(Blocks: 1 bug, {regression, sec-high})

unspecified
mozilla27
regression, sec-high
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox25 unaffected, firefox26+ fixed, firefox27+ fixed, firefox-esr17 unaffected, firefox-esr24 unaffected, b2g18 unaffected)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Updated

5 years ago
status-firefox26: --- → affected
status-firefox27: --- → affected
(Assignee)

Comment 1

5 years ago
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.
(Assignee)

Comment 4

5 years ago
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+
(Assignee)

Comment 6

5 years ago
Tree is closed right now, so marking checkin-needed in case I forget about this.
Keywords: checkin-needed
(Assignee)

Updated

5 years ago
status-b2g18: --- → unaffected
status-firefox25: --- → unaffected
status-firefox-esr17: --- → unaffected
status-firefox-esr24: --- → unaffected
tracking-firefox26: --- → ?
https://hg.mozilla.org/mozilla-central/rev/9b0f18ffd8f1
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
(Assignee)

Comment 9

5 years ago
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+
status-firefox27: affected → fixed
tracking-firefox26: ? → +
tracking-firefox27: --- → +
(Assignee)

Comment 10

5 years ago
https://hg.mozilla.org/releases/mozilla-aurora/rev/371b06430e3b
status-firefox26: affected → fixed

Updated

5 years ago
Whiteboard: [qa-]
Group: core-security
You need to log in before you can comment on or make changes to this bug.