Out of bounds write in ANGLE (CVE-2026-9916)
A logic flaw in ANGLE's Pixel Local Storage restore path skips the dimension check that normally runs when a PLS session begins. A compromised renderer could attach an oversized framebuffer texture while PLS is interrupted, so later shader stores write outside the small PLS texture and corrupt GPU process memory.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 52 days
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 logic flaw in ANGLE's Pixel Local Storage (PLS) implementation allows a compromised renderer to bypass dimension validation during PLS restoration. By injecting an oversized framebuffer attachment while PLS is interrupted, an attacker can cause out-of-bounds imageStore operations in the GPU process. This can lead to memory corruption and potential arbitrary code execution within the privileged GPU process.
Affected files:
third_party/angle/src/libANGLE/PixelLocalStorage.cppthird_party/angle/src/compiler/translator/tree_ops/RewritePixelLocalStorage.cppthird_party/angle/src/libANGLE/validationESEXT.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
Estimated timestamp from git blame: 2023-07-13
Vulnerability Mechanism
A vulnerability exists in ANGLE's implementation of the ANGLE_shader_pixel_local_storage extension where a logic flaw allows an attacker to bypass critical dimension validation during a Pixel Local Storage (PLS) restore operation.
The core issue is that restoring a suspended PLS session via glFramebufferPixelLocalStorageRestoreANGLE invokes PixelLocalStorage::restore(), which directly calls the internal Context::beginPixelLocalStorage() method. This completely bypasses the standard validation path (ValidateBeginPixelLocalStorageANGLE), which is responsible for ensuring that the PLS backing texture dimensions exactly match the dimensions of the framebuffer's rendering area.
Potential Exploit Steps
Note: These are potential steps as our tooling agent has not executed a live proof of concept.
An attacker with a compromised renderer process could trigger this out-of-bounds write via raw GLES command buffer operations by following these steps:
- Initialize PLS with a small texture: Create a Framebuffer Object (FBO) and attach a small texture (e.g., 16x16) to a PLS plane using
glFramebufferTexturePixelLocalStorageANGLE. Ensure there are no standard color/depth attachments. - Begin PLS: Call
glBeginPixelLocalStorageANGLE. Because there are no standard attachments,ValidateBeginPixelLocalStorageANGLEskips thekPLSDimensionsDontMatchRenderingAreadimension check. The PLS session starts with an active plane dimension of 16x16. - Interrupt PLS: Call
glFramebufferPixelLocalStorageInterruptANGLE. This safely suspends the PLS session and zeros out the active plane count in the context state, while saving the fact that 1 plane was active. - Inject an oversized attachment: Call
glFramebufferTexture2Dto attach a large texture (e.g., 4096x4096) toGL_COLOR_ATTACHMENT0. Because the active PLS plane count was zeroed during the interrupt, the implicit PLS-end guard in the entry point is bypassed, and the standard attachment succeeds. - Restore PLS: Call
glFramebufferPixelLocalStorageRestoreANGLE. The validation for this command only verifies that an interrupt is pending. The restoration process directly invokes the internal PLS start sequence, bypassingValidateBeginPixelLocalStorageANGLE. The system fails to realize the 16x16 PLS texture no longer matches the new 4096x4096 rendering area. - Draw with PLS: Execute a draw call (e.g.,
glDrawArrays) using a shader that utilizespixelLocalStoreANGLEand a viewport of 4096x4096.
Impact
During shader compilation, the ANGLE shader translator (RewritePixelLocalStorage.cpp) rewrites PLS store operations to native imageStore instructions using gl_FragCoord.xy as the coordinate, without performing any bounds clamping.
Because the rendering area is 4096x4096, fragments are generated with coordinates up to (4095, 4095). The shader executes imageStore using these coordinates into the PLS image unit, which is backed by the 16x16 texture.
ANGLE's Vulkan renderer does not enable VK_EXT_image_robustness or the robustImageAccess feature for storage images. Consequently, these operations result in an unchecked out-of-bounds write to GPU memory. This memory corruption can be leveraged by the attacker to overwrite critical data structures, hijack control flow, and achieve Remote Code Execution (RCE) and Sandbox Escape within the highly privileged GPU process.
Suggested Fix
The PLS implementation must ensure that the framebuffer attachments are still compatible with the PLS planes upon restoration.
One approach is to have Context::framebufferPixelLocalStorageRestore (or ValidateFramebufferPixelLocalStorageRestoreANGLE) perform the same dimension checks found in ValidateBeginPixelLocalStorageANGLE. If the dimensions of the texture-backed PLS planes no longer match the rendering area (the intersection of all attachment extents), the restore operation should fail and return a GL_INVALID_OPERATION error.
Alternatively, modifying the framebuffer attachments (e.g., via glFramebufferTexture2D) while PLS is interrupted could be explicitly forbidden, or forced to clear the pending PLS interrupt state.
Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad
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 PLS restore path calls the internal begin routine directly, bypassing the dimension validation that the normal begin entry point performs.
Impact
The unchecked out-of-bounds write could corrupt GPU memory and potentially allow code execution and sandbox escape in the privileged GPU process, though the report notes no live proof of concept was run.
What the attacker needed
Compromised renderer process; ability to issue raw GLES commands
The fix
The restore path should repeat the same dimension checks as the begin path and fail with an invalid-operation error on mismatch, or attachment changes during an interrupt should be forbidden.
How it was found
- Create a framebuffer with a small texture attached to a PLS plane and no standard colour or depth attachments.
- Begin the PLS session, which skips the dimension check because there are no standard attachments.
- Interrupt the PLS session, which zeroes the active plane count while remembering one plane was active.
- Attach a much larger texture to colour attachment zero, which succeeds because the PLS-end guard is bypassed.
- Restore the PLS session, which skips the dimension check again and does not notice the size mismatch.
- Draw with a shader that stores to PLS using a viewport matching the large texture.
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.
Pixel Local Storage lets a shader keep a small scratch image while it draws. Normally the browser checks that this scratch image is the same size as the area being drawn, but the restore path forgets that check. If an attacker swaps in a much bigger drawing area, the shader writes past the end of the small image, which can corrupt memory in the graphics process.
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.