Google Chrome WebGL rx::Image11::disassociateStorage use-after-free vulnerability
A use-after-free exists in Chrome's ANGLE WebGL layer: redefining an EGL image texture frees the associated texture storage, then a later redefine calls disassociateStorage on the already-freed object. A crafted web page could trigger the crash and potentially lead to memory corruption.
Originally disclosed on Cisco Talos
A use-after-free vulnerability exists in the WebGL rx::Image11::disassociateStorage functionality of Google Chrome Stable 110.0.5481.78 (64-bit) / Chromium 112.0.5592.0 (Build) (64-bit). A specially crafted web page can lead to a use-after-free.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the redefineImage path releases the texture storage (freeing the associated storage object) before calling redefine, which then calls disassociateStorage on the stale pointer.
Impact
A specially crafted web page could trigger a use-after-free in the GPU process, leading to a crash and potentially to memory corruption with high confidentiality and integrity impact.
What the attacker needed
Victim visits a crafted web page; WebGL2 with desynchronized enabled; Windows/D3D11 renderer
How it was found
- Create a WebGL2 context with the desynchronized option set to true.
- Use texParameteri and texImage2D so that canCreateRenderTargetForImage returns false.
- Trigger copySubTexture so commitRegion runs and copyToStorage sets mRecoverFromStorage.
- Cause the texture to be redefined as an EGL image target, which frees the storage and then calls disassociateStorage on the freed object.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
WebGL lets web pages draw 3D graphics, and Chrome hands that work to a helper library called ANGLE. A use-after-free means the program keeps using a chunk of memory after it has been handed back, so the contents can be swapped for something else. A malicious page could exploit this to crash the browser or possibly run its own code.
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.