Skip to content
Info disclosure Advisory Advanced CVE-2026-14384

Out of bounds read in ANGLE (CVE-2026-14384)

The ANGLE HLSL backend fails to unfold short-circuit expressions when the right-hand side has no side effects, such as an indirect array access. On the Windows D3D11 backend, where local array index clamping is disabled, this can cause an unconditional out-of-bounds read that may leak uninitialised GPU temporary registers containing cross-origin data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: The ANGLE HLSL backend fails to unfold logical short-circuit expressions containing unsafe but side-effect-free operations, such as indirect array accesses. On the Windows D3D backend, where local array index clamping is disabled by the passthrough decoder, this results in unconditional out-of-bounds reads. This can potentially leak uninitialized GPU temporary registers containing cross-origin data.

Affected files:

  • third_party/angle/src/compiler/translator/tree_util/IntermNodePatternMatcher.cpp
  • third_party/angle/src/compiler/translator/hlsl/OutputHLSL.cpp

Estimated timestamp from git blame: 2016-12-12

Description

There is a potential out-of-bounds read and information leak vulnerability in ANGLE's HLSL backend due to the intersection of two logic flaws: improper short-circuit expression unfolding and missing indirect array bounds clamping.

When compiling WebGL shaders to HLSL, ANGLE transforms the AST. Because HLSL does not guarantee short-circuiting for && and || operators (the HLSL compiler often flattens the execution path, evaluating both sides), ANGLE uses the UnfoldShortCircuitToIf pass to convert these expressions into explicit if statements.

However, the pattern matcher for this pass (IntermNodePatternMatcher::matchInternal in third_party/angle/src/compiler/translator/tree_util/IntermNodePatternMatcher.cpp, lines 52-59) only unfolds the expression if the right-hand side has side effects:

C++
if ((mMask & kUnfoldedShortCircuitExpression) != 0)
{
    if (node->getRight()->hasSideEffects() &&
        (node->getOp() == EOpLogicalOr || node->getOp() == EOpLogicalAnd))
    {
        return true;
    }
}

Operations like indirect array indexing (EOpIndexIndirect) do not have side effects. Consequently, an expression like safe && (data[idx] > 0.0) is not unfolded. The HLSL code generator (OutputHLSL.cpp) then emits a raw && operator, incorrectly assuming that any expression requiring short-circuiting has already been handled.

Compounding this issue, the Chrome WebGL passthrough command decoder on Windows (which uses the D3D11 backend) bypasses the manual ShaderTranslator initialization that normally enables clampIndirectArrayBounds. Furthermore, the D3D backend itself (ShaderD3D.cpp) does not explicitly enable options->clampIndirectArrayBounds = true (unlike ShaderVk.cpp and ShaderGL.cpp). Therefore, indirect indices on local HLSL arrays are not clamped.

When the shader executes on the GPU, the flattened execution path unconditionally evaluates the out-of-bounds array access. D3D11's robustness guarantees prevent a full crash, but the read will fetch values from adjacent indexable temporary registers (x registers). If the GPU driver has not zero-initialized these registers between executions, this allows an attacker to leak cross-origin WebGL data or data from other GPU processes.

Potential Reproduction Steps

Note: These are theoretical steps derived from code analysis; our tooling agent does not currently have the ability to run code to verify the exploit end-to-end.

  1. On a Windows Chrome instance (using the D3D11 ANGLE backend and passthrough decoder), create a WebGL 2.0 context.

  2. Compile a fragment shader that utilizes a logical AND with an out-of-bounds array read on the right-hand side:

    GLSL
    #version 300 es
    precision highp float;
    uniform int idx;
    uniform bool safe;
    out vec4 color;
    void main() {
      float data[4] = float[4](1., 2., 3., 4.);
      bool b = safe && (data[idx] > 0.0);
      color = vec4(b ? 1.0 : 0.0);
    }
    
  3. Bind the shader and set the uniform safe = false and idx to a large out-of-bounds value.

  4. Execute a draw call and read back the resulting pixels. Observe that the result depends on the evaluation of data[idx] (leaking GPU temporary register state) despite safe being false.

Suggested Fix

  1. Fix Short-Circuit Unfolding: In IntermNodePatternMatcher::matchInternal, replace the reliance on hasSideEffects() with a more comprehensive safety check. The SPIR-V backend already implements an IsSafeToExecuteInShortCircuit() function (third_party/angle/src/compiler/translator/spirv/OutputSPIRV.cpp), which correctly identifies that array indexing is unsafe to execute speculatively. This logic should be abstracted and reused for the HLSL backend.
  2. Enable Index Clamping: Ensure that clampIndirectArrayBounds is enabled for the D3D backend. In third_party/angle/src/libANGLE/renderer/d3d/ShaderD3D.cpp, explicitly set options->clampIndirectArrayBounds = true; during ShaderD3D::compile to provide defense-in-depth against OOB local array reads.

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from 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 short-circuit unfolding pass only unfolds expressions whose right-hand side has side effects, so an indirect array access is not unfolded, and the D3D backend does not clamp indirect array bounds.

Impact

An attacker could potentially leak cross-origin WebGL data or data from other GPU processes, though D3D11 robustness guarantees prevent a full crash.

What the attacker needed

Windows Chrome with D3D11 ANGLE backend; ability to run WebGL shaders

The fix

The short-circuit unfolding check should be made more comprehensive by reusing the SPIR-V backend's safety logic, and indirect array bounds clamping should be enabled for the D3D backend.

How it was found

  1. Create a WebGL 2.0 context on Windows Chrome using the D3D11 ANGLE backend.
  2. Compile a fragment shader with a logical AND whose right-hand side reads an array at an out-of-bounds index.
  3. Set the uniform guarding the AND to false and the index to a large out-of-bounds value.
  4. Execute a draw call and read back the pixels to observe the leaked register state.

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 shaders are small programs that run on the graphics card. ANGLE translates them so they can run on Windows. A mistake in that translation means a shader can read memory it should not, and that memory might contain data from another website.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.