Google Chrome WebGPU DoBufferDestroy kDirect allocation use-after-free vulnerability
A use-after-free exists in Chrome's WebGPU implementation on Windows: a large buffer is allocated directly, tracked as a pending heap, then destroyed, freeing the heap object while it remains in the pending-usage list. A crafted web page could trigger the freed heap to be read again, potentially leading to memory corruption.
Originally disclosed on Cisco Talos
A use-after-free vulnerability exists in the WebGPU functionality of Google Chrome 102.0.4956.0 (Build) (64-bit) and 99.0.4844.82 (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 heap object is deleted during buffer destruction but is not removed from the pending-usage list, so it is later dereferenced.
Impact
A crafted web page could trigger a use-after-free in the GPU process, which may lead to memory corruption; the report does not demonstrate code execution.
What the attacker needed
Chrome on Windows with D3D12; WebGPU enabled (unsafe flag); victim opens a crafted page
How it was found
- Create a very large WebGPU buffer so direct allocation is used
- Write to the buffer so its heap is tracked as pending usage
- Destroy the buffer, which frees the heap object
- Let the command list execute, which reads the freed heap
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.
When a program frees memory it should stop using it. Here Chrome kept a pointer to a chunk of graphics memory after freeing it, then read from it later. A malicious page could exploit that to corrupt memory, which in a browser can be serious.
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.