Specifically the ones that call GetParsingInfo: that assumes the global is a Window.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8509965 [details] [diff] [review] Don't assume the global is a Window in the DOM CSS object Review of attachment 8509965 [details] [diff] [review]: ----------------------------------------------------------------- Oh, yuck - this is exactly the kind of stuff I'm worried about. Any ideas on how to better avoid this in the future? Just audit more carefully?
Attachment #8509965 - Flags: review?(bobbyholley) → review+
> Any ideas on how to better avoid this in the future? Not yet. :( Do you think this is worth backporting anywhere?
(In reply to Boris Zbarsky [:bz] from comment #3) > Do you think this is worth backporting anywhere? Yeah, until someone audits the devtools code that uses this we should assume the worst.
Comment on attachment 8509965 [details] [diff] [review] Don't assume the global is a Window in the DOM CSS object [Security approval request comment] How easily could an exploit be constructed based on the patch? Probably hard. Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem? It's clear that we were casting when we shouldn't be, but not much beyond that. Which older supported branches are affected by this flaw? FF32 and onward. If not all supported branches, which bug introduced the flaw? bug 1002280. 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? Low risk.
Attachment #8509965 - Flags: sec-approval?
The devtools code only uses CSS.escape(), which is not affected here. But yes, pretty happy to backport; it should just apply as-is.
Do we use CSS.supports() anywhere? I only found it in some tests so maybe sec-moderate, as a potential but unrealized risk, is more appropriate. sec-approval+ for landing now and on Aurora. If it's really sec-high we should land on beta too.
Attachment #8509965 - Flags: sec-approval? → sec-approval+
Target Milestone: --- → mozilla36
Comment on attachment 8509965 [details] [diff] [review] Don't assume the global is a Window in the DOM CSS object Approval Request Comment [Feature/regressing bug #]: Bug 1002280 [User impact if declined]: Probably none, but possible security issues. [Describe test coverage new/current, TBPL]: There isn't really any for this case. [Risks and why]: Very low risk. Just makes a case that used to crash throw instead. [String/UUID change made/needed]: None. I think we should go ahead and fix on beta too, so addons don't trigger this.
Lowering severity to moderate: there are no uses of CSS.supports() in our tree (not counting unit tests for the feature). It requires Chrome privs to combine this with evalInSandbox() so this isn't an attack available to remote web content as implied by a "high" rating. It's possible there's an add-on out there using this, and for that add-on's users the danger may be "high" but overall the risk is lower.
Whiteboard: [adv-main34+] → [adv-main34-]
You need to log in before you can comment on or make changes to this bug.