Xray Waivers can be used to bypass COWs
Originally disclosed on Mozilla
- Fixed in 17 days
- Paid in 14 days
- Disclosed after 17 days
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.
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.