Skip to content
Memory corruption Advisory Advanced CVE-2026-11191

Out of bounds memory access in ANGLE (CVE-2026-11191)

ANGLE's shader translator can emit malformed shaders with out-of-bounds array accesses when a fragment shader uses both GL_EXT_draw_buffers and GL_EXT_blend_func_extended, because the gl_FragData array is resized without re-validating existing constant indices. The resulting invalid SPIR-V is passed to the native GPU driver, potentially causing memory corruption in the GPU process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 48 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 Chrome Security team. Please see go/chrome-ai-generated-security-bugs-faq for more information.

Overview: ANGLE's shader translator can emit structurally malformed shaders with out-of-bounds array accesses when a fragment shader uses both GL_EXT_draw_buffers and GL_EXT_blend_func_extended. This occurs because the gl_FragData array is resized to a smaller value during AST transformation without re-validating or clamping existing constant indices. The resulting malformed shader code is passed to the native GPU driver, potentially causing memory corruption in the GPU process during shader compilation.

Affected files:

  • third_party/angle/src/compiler/translator/tree_ops/spirv/EmulateFragColorData.cpp
  • third_party/angle/src/compiler/translator/spirv/TranslatorSPIRV.cpp
  • third_party/angle/src/compiler/translator/glsl/TranslatorGLSL.cpp
  • third_party/angle/src/compiler/translator/msl/TranslatorMSL.cpp
  • third_party/angle/src/compiler/translator/ValidateAST.cpp
  • third_party/angle/src/compiler/translator/ParseContext.cpp

Estimated timestamp from git blame: 2023-07-17

Vulnerability Details

A logic error exists in ANGLE's shader translation process that allows the generation of structurally malformed backend shaders (such as SPIR-V) containing out-of-bounds array accesses.

This issue manifests through the following sequence of events:

  1. Initial Parsing: A WebGL fragment shader accesses a high valid index of gl_FragData, such as gl_FragData[7]. In ParseContext.cpp, this is validated against MaxDrawBuffers (typically 8). Since 7 < 8, the bounds check passes, and an EOpIndexDirect AST node is created with the constant literal index 7.
  2. Array Resizing: If the shader also uses gl_SecondaryFragDataEXT (provided by GL_EXT_blend_func_extended), the EmulateFragColorData transformation pass is triggered during compilation.
  3. Size Reduction: EmulateFragColorDataTraverser::visitSymbol replaces gl_FragData with a new internal array and resizes it to MaxDualSourceDrawBuffers. On most hardware, this limits the array size to 1.
  4. Missing Re-validation: The transformation does not traverse the parent tree to clamp or re-evaluate existing EOpIndexDirect nodes. ValidateAST also lacks bounds-checking for constant indices. Thus, an index of 7 pointing into an array of size 1 remains in the AST.
  5. Malformed Output Emission: During SPIR-V generation (OutputSPIRV.cpp), the literal index 7 is extracted from the EOpIndexDirect node and directly emitted into an OpAccessChain instruction without further bounds checking.
  6. Validation Bypass: In Chromium Release builds, ANGLE_ENABLE_ASSERTS is false, meaning ANGLE's internal spirv-val validation step is skipped for performance reasons.

The resulting structurally invalid SPIR-V is passed directly to the native Vulkan GPU driver via vkCreateShaderModule. Native drivers typically assume SPIR-V from trusted environments is structurally valid. Processing an out-of-bounds OpAccessChain leads to undefined behavior within the driver's shader compiler, frequently resulting in out-of-bounds memory reads or writes in the GPU process.

Impact

Compromising the GPU process allows an attacker to bypass the renderer sandbox on Desktop platforms (Windows, macOS, Linux). On Android, the GPU process is unsandboxed by default, meaning this could lead directly to arbitrary code execution on the host device.

Potential Reproduction Steps

Note: These are suggested steps to trigger the bug. We have not executed a full working proof-of-concept against a live driver.

  1. Initialize a WebGL context.

  2. Enable the required extensions in JavaScript:

    JavaScript
    gl.getExtension('WEBGL_draw_buffers');
    gl.getExtension('WEBGL_blend_func_extended');
    
  3. Compile a fragment shader that writes to both extensions:

    GLSL
    #extension GL_EXT_draw_buffers : require
    #extension GL_EXT_blend_func_extended : require
    precision mediump float;
    void main() {
        // Passes ParseContext validation (7 < MaxDrawBuffers)
        gl_FragData[7] = vec4(1.0);
        // Triggers EmulateFragColorData, reducing gl_FragData size to 1
        gl_SecondaryFragDataEXT[0] = vec4(0.0);
    }
    
  4. Bind the shader and issue a draw call. On a Vulkan backend, ANGLE will submit the malformed SPIR-V to the driver.

Suggested Fix

The AST needs to remain consistent after the EmulateFragColorData transformation. We suggest updating EmulateFragColorData so that when gl_FragData is resized, the compiler traverses the AST to identify EOpIndexDirect nodes associated with this variable. Any indices that now exceed the new array size (MaxDualSourceDrawBuffers) should be clamped to MaxDualSourceDrawBuffers - 1, or alternatively, the compilation should be explicitly failed with an out-of-range error at the transformation stage.

Evaluated with Chrome root at commit: 661452647ddb2827305122ff3273bd5dea403f09


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 EmulateFragColorData transformation resizes the gl_FragData array without re-validating or clamping existing constant index nodes, and ValidateAST lacks bounds-checking for constant indices.

Impact

Compromising the GPU process could bypass the renderer sandbox on desktop platforms and may lead directly to arbitrary code execution on Android, where the GPU process is unsandboxed by default.

What the attacker needed

WebGL context; WEBGL_draw_buffers extension; WEBGL_blend_func_extended extension; Vulkan backend

The fix

The EmulateFragColorData transformation should clamp out-of-range constant indices to the new array size or explicitly fail compilation with an out-of-range error.

How it was found

  1. Initialize a WebGL context.
  2. Enable the WEBGL_draw_buffers and WEBGL_blend_func_extended extensions in JavaScript.
  3. Compile a fragment shader that writes to gl_FragData[7] and gl_SecondaryFragDataEXT[0].
  4. Bind the shader and issue a draw call so ANGLE submits the malformed SPIR-V to the driver on a Vulkan backend.

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 shader is a small program that runs on the graphics card. ANGLE is a translator that converts WebGL shaders into a form the graphics driver can understand. A bug in this translation lets a shader refer to an array element that no longer exists, and the graphics driver may then read or write memory it should not, which can crash or compromise the process that talks to the GPU.

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 from Google Chrome

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.