Closed Bug 1087801 Opened 8 years ago Closed 8 years ago

Some properties of the CSS object are not safe in a sandbox


(Core :: DOM: Core & HTML, defect)

Not set



Tracking Status
firefox33 --- wontfix
firefox34 --- fixed
firefox35 + fixed
firefox36 + fixed
firefox-esr31 --- unaffected
b2g-v1.4 --- unaffected
b2g-v2.0 --- fixed
b2g-v2.0M --- fixed
b2g-v2.1 --- fixed
b2g-v2.2 --- fixed


(Reporter: bzbarsky, Assigned: bzbarsky)



(Keywords: regression, sec-moderate, Whiteboard: [adv-main34-])


(1 file)

Specifically the ones that call GetParsingInfo: that assumes the global is a Window.
Assignee: nobody → bzbarsky
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?
Flags: needinfo?(bobbyholley)
(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.
Flags: needinfo?(bobbyholley)
Keywords: sec-high
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?


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+
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.
Attachment #8509965 - Flags: approval-mozilla-beta?
Attachment #8509965 - Flags: approval-mozilla-aurora?
Closed: 8 years ago
Resolution: --- → FIXED
Attachment #8509965 - Flags: approval-mozilla-beta?
Attachment #8509965 - Flags: approval-mozilla-beta+
Attachment #8509965 - Flags: approval-mozilla-aurora?
Attachment #8509965 - Flags: approval-mozilla-aurora+
Whiteboard: [adv-main34+]
Alias: CVE-2014-8633
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.
Keywords: sec-highsec-moderate
Alias: CVE-2014-8633
Whiteboard: [adv-main34+] → [adv-main34-]
Group: core-security → core-security-release
Group: core-security-release
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.