Skip to content
Memory corruption Advisory Advanced CVE-2023-1531

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.

Piotr Bania Follow

Originally disclosed on Cisco Talos

High 8.3 View original

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.

Piotr Bania, on Cisco Talos

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

  1. Create a WebGL2 context with the desynchronized option set to true.
  2. Use texParameteri and texImage2D so that canCreateRenderTargetForImage returns false.
  3. Trigger copySubTexture so commitRegion runs and copyToStorage sets mRecoverFromStorage.
  4. 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.

More by Piotr Bania

View all

94 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.