Use after free in ANGLE (CVE-2026-11055)
A use-after-free flaw in ANGLE's D3D11 backend allows an attacker to force the cache to evict the storage object currently being processed, leaving a dangling pointer that is later used for a virtual call. This could lead to arbitrary code execution in the GPU process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the security team.
Overview: A potential Use-After-Free (UAF) exists in ANGLE's D3D11 backend due to an LRU cache self-eviction flaw when emulating buffer sub-ranges. By manipulating the size parameter in glBindBufferRange, an attacker can force the cache to free the storage object currently being processed. The code subsequently makes a virtual function call on this freed pointer, which could lead to arbitrary code execution in the GPU process.
Affected files:
third_party/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.cppthird_party/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.h
Estimated timestamp from git blame: 2025-05-14
Description
A potential Use-After-Free (UAF) vulnerability exists in ANGLE's D3D11 backend, specifically in Buffer11::getConstantBufferRangeStorage and Buffer11::getStructuredBufferRangeSRV. When running on hardware that lacks native constant buffer offsetting support (e.g., D3D Feature Level 11.0), ANGLE emulates sub-ranges by caching them in an LRU (Least Recently Used) cache.
The vulnerability is triggered by a logic flaw in the cache eviction loop. When an attacker requests a buffer range size that expands an existing cached entry beyond an internal budget (2 * getSize()), the function enters a while loop to evict older cache entries and reclaim space. However, if the cache only contains the entry currently being processed (or if the current entry happens to have the lowest LRU count), the eviction loop will select and delete the newStorage object that is actively being used.
While an ASSERT(iter->second.storage != newStorage) exists to detect this exact self-eviction flaw, ASSERT macros are compiled out into no-ops in Release builds. Consequently, the object is freed via SafeDelete(), but the local newStorage raw pointer is left dangling. Immediately following the loop, the code invokes newStorage->resize(...). Because BufferStorage is a polymorphic class, this results in a virtual function call on freed memory.
Potential Attacker Steps
(Note: These are suggested steps based on static analysis; our tooling agent does not yet have the ability to run code or provide a working PoC.)
- Initialize WebGL: The attacker creates a WebGL 2 context on a system using the D3D11 backend without native offsetting support.
- Create Buffer: The attacker creates a uniform buffer with a specific base size, e.g., 1000 bytes.
- Populate Cache: The attacker calls
glBindBufferRangewith a size larger than the buffer (e.g., 1500 bytes). WebGL validation allows this because draw call validation only checks the clamped available size (std::min(size, bufferSize - offset)) against the shader's requirements. A draw call is issued, causing ANGLE to cache aBufferStorageobject of size 1500. - Trigger Self-Eviction: The attacker updates the binding with an even larger size (e.g., 3000 bytes) and issues another draw call.
- UAF Execution: Inside
getConstantBufferRangeStorage, the requested size exceeds the allowed additional size budget (2000 bytes). The eviction loop triggers and deletes the 1500-byte storage object (the only item in the cache). The code then callsnewStorage->resize()on the freed pointer. - Exploitation: By using Web Workers to concurrently spray the GPU process heap, the attacker could replace the freed object with controlled data, hijacking the virtual function table (vtable) to achieve Remote Code Execution (RCE) in the GPU process.
Suggested Fix
The eviction logic must be updated to explicitly protect the actively processed storage object from being evicted.
Inside the while loops in getConstantBufferRangeStorage and getStructuredBufferRangeSRV, the std::min_element search should be modified to filter out newStorage. Alternatively, the code can explicitly check if iter->second.storage == newStorage and break the loop or skip eviction for that entry, ensuring the active object remains alive.
Additionally, evaluating whether to clamp the requested size to the buffer's physical boundaries much earlier in the pipeline (or inside the caching logic itself) could prevent the cache from artificially inflating beyond the physical buffer's bounds.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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
The cache eviction loop does not exclude the currently processed storage object from eviction, and the safety check is compiled out in release builds.
Impact
This could lead to arbitrary code execution in the GPU process, though the report notes it is a potential issue based on static analysis without a working proof of concept.
What the attacker needed
WebGL 2 context on D3D11 backend; Hardware without native constant buffer offsetting; Ability to issue draw calls
The fix
The eviction logic should be updated to explicitly protect the actively processed storage object from being evicted, for example by filtering it out of the eviction search or breaking the loop when it is selected.
How it was found
- Create a WebGL 2 context on a system using the D3D11 backend without native offsetting support.
- Create a uniform buffer with a specific base size, e.g., 1000 bytes.
- Call glBindBufferRange with a size larger than the buffer (e.g., 1500 bytes) and issue a draw call, causing ANGLE to cache a BufferStorage object of size 1500.
- Update the binding with an even larger size (e.g., 3000 bytes) and issue another draw call.
- Inside getConstantBufferRangeStorage, the eviction loop deletes the 1500-byte storage object, and the code then calls newStorage->resize() on the freed pointer.
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.
A use-after-free happens when a program frees memory but then keeps using it, like deleting a file and then trying to open it. Here, a caching system mistakenly deletes the very item it is working on, and then calls a function through that deleted item, which an attacker could exploit to run their 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.