Skip to content
Disclosed report

Xray Waivers can be used to bypass COWs

Bobby Holley Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 17 days
  • Paid in 14 days
  • Disclosed after 17 days
Text
This is the lynchpin of bug 863933.

Basically, the prototype remapping code in WrapperFatory::Rewrap uses js::Wrapper::wrappedObject instead of js::UncheckedUnwrap to determine if the underlying object is a standard prototype. This means that if there's another wrapper in the middle (like an Xray waiver), we can be fooled into thinking that the object is not a standard prototype. However, the code in ChromeObjectWrapper.cpp unconditionally lets accesses to standard-prototype properties through, under the assumption that they'll get remapped.

To fix this, we should do a couple of things:
* Definitely stop using js::Wrapper::wrappedObject here
* Move this whole thing from prototype calculation into WrapperFactory::PrepareForWrapping so that we unconditionally get the right object when we cross the boundary.

In the long term, we should really just kill this prototype remapping stuff entirely.

The original report as published on Mozilla's Bugzilla, by Bobby Holley. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A critical-severity security bug in XPConnect. Mozilla made it public on 16 May 2013.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

More by Bobby Holley

View all

2 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.