WebGL allows access to uninitialised graphics memory
Originally disclosed on Mozilla
- Fixed in 2 days
- Paid in 2.2 years
- Disclosed after 2 days
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier:
The linked conformance test checks that a WebGL canvas isn't given unintialised memory when it is resized. We found that it fails on some configurations on Windows XP and MacOS X. By using a larger canvas is it possible to view graphics data from other web pages, and on MacOS various parts of the desktop as well.
I'm attaching a PoC that loads an iframe onto a texture (by applying a CSS transform/transition to it), then searches for it in graphics memory. An SVG color matrix filter is allied to it to set the red channel to a specific value which we then search for. Although the retrieved image is somewhat scrambled, the PoC could be further developed by encoding position information for each pixel into the color channels and using that information to reconstruct the whole image.
We've tested this with success on Intel and ATI cards on WinXP and Nvidia and Intel cards on some recent Macs.
Reproducible: Always
Steps to Reproduce:
1. Get WebGL context
2. Resize canvas
3. Copy WebGL canvas onto 2d canvas
4. read pixels
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 memory corruption bug in Graphics: CanvasWebGL. Mozilla made it public on 26 May 2011.
About Memory corruption
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.