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

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

A logic error in ANGLE's shader translator lets comma expressions carrying opaque pixel-local-storage types slip past type checks, so a function call is not monomorphised. This leads to dereferencing an invalid map iterator and wild pointer use in the GPU process, which on unsandboxed platforms such as Android could potentially lead to a sandbox escape.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 20 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 https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A logic error in ANGLE's shader translator allows comma expressions to bypass opaque-type checks, leading to incorrect function monomorphization. This results in an invalid map iterator dereference and wild pointer usage in the GPU process during shader compilation. On platforms where the GPU process is unsandboxed, such as Android, this could potentially lead to a sandbox escape.

Affected files:

  • third_party/angle/src/compiler/translator/tree_ops/MonomorphizeUnsupportedFunctions.cpp
  • third_party/angle/src/compiler/translator/ParseContext.cpp
  • third_party/angle/src/compiler/translator/tree_ops/RewritePixelLocalStorage.cpp
  • third_party/angle/src/compiler/translator/IntermNode.cpp

Estimated timestamp from git blame: Unknown (Google3 checkout)

Summary

A memory corruption vulnerability potentially exists in the ANGLE shader translator due to improper handling of comma (sequence) expressions containing opaque types, specifically those related to Pixel Local Storage (PLS). When a comma expression is used to pass a PLS variable to a function, the translator fails to correctly identify and monomorphize the function call. This leads to a std::map::end() iterator dereference in the RewritePixelLocalStorage pass, resulting in wild pointer usage.

Root Cause Analysis

The vulnerability stems from three interacting issues in the translator's tree operations:

  1. Missing Opaque Type Check in TParseContext::addComma: In src/compiler/translator/ParseContext.cpp, the addComma function does not invoke binaryOpCommonCheck. Unlike other binary expressions, it fails to reject operands with opaque types. This allows expressions like (i++, pls) (where pls is a pixelLocalANGLE uniform) to be parsed as a valid AST node, even though opaque types are prohibited as operands to the sequence operator.

  2. Incorrect Traversal in GetBaseUniform: In src/compiler/translator/tree_ops/MonomorphizeUnsupportedFunctions.cpp, the GetBaseUniform helper function incorrectly handles binary nodes by always descending into the left operand. For a comma expression, the semantic value is the right operand. By walking left, GetBaseUniform encounters the side-effect (e.g., i++) instead of the uniform. This causes the function to return nullptr, preventing the MonomorphizeUnsupportedFunctions pass from specializing the function call.

  3. Map Iterator Dereference in RewritePixelLocalStorage: The RewritePixelLocalStorage pass expects all functions using PLS types to have been monomorphized. Because specialization was skipped, the pass encounters a PLS symbol that is a function parameter. Function parameters lack layout bindings (defaulting to -1). When PLSBackingStoreMap::find attempts to look up this binding:

    C++
    auto iter = mMap.find(binding); // binding is -1
    return iter->second;            // Dereferences mMap.end() in release builds
    

    Dereferencing the end() iterator returns a wild TVariable* pointer, which is then used to construct new AST nodes, leading to memory corruption or type confusion in the GPU process.

Potential Attack Vector

An attacker with control over a renderer process could potentially trigger this vulnerability by submitting a crafted GLSL shader. The following fragment shader illustrates the potential trigger:

GLSL
#version 300 es
#extension GL_ANGLE_shader_pixel_local_storage : require
precision highp float;
layout(binding=0, rgba8) uniform highp pixelLocalANGLE pls;

vec4 load_wrapper(pixelLocalANGLE p) {
    return pixelLocalLoadANGLE(p);
}

out vec4 color;
void main() {
    int i = 0;
    // Comma expression bypasses checks and prevents monomorphization
    color = load_wrapper((i++, pls));
}

Suggested Fix

  1. Update TParseContext::addComma in ParseContext.cpp to include opaque type checks, similar to binaryOpCommonCheck or addTernarySelection.
  2. Correct GetBaseUniform in MonomorphizeUnsupportedFunctions.cpp to handle EOpComma by descending into the right operand instead of the left.
  3. Harden PLSBackingStoreMap::find in RewritePixelLocalStorage.cpp to explicitly check if the iterator is valid before dereferencing, even in release builds.

Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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

Likely the comma operator's parse step never rejected opaque-type operands, and the monomorphisation helper walked the left operand of a comma expression instead of the right, so the function was never specialised and a later pass dereferenced a missing map entry.

Impact

On platforms where the GPU process is unsandboxed, such as Android, this could potentially lead to a sandbox escape; elsewhere it causes memory corruption or type confusion in the GPU process.

What the attacker needed

Attacker controls a renderer process; ability to submit a crafted shader; GPU process unsandboxed for escape

The fix

The parse step should reject opaque types in comma expressions, the monomorphisation helper should descend into the right operand of a comma, and the backing-store lookup should check the iterator before dereferencing.

How it was found

  1. Write a fragment shader that enables the pixel local storage extension and declares a pixelLocalANGLE uniform.
  2. Define a wrapper function that takes a pixelLocalANGLE parameter and loads from it.
  3. Call the wrapper with a comma expression whose right side is the uniform and whose left side is a side effect.
  4. Submit the shader so the translator compiles it and the pixel local storage rewrite pass runs.

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, and ANGLE is the component that translates it. The translator has a step that copies a function for each kind of special variable it receives, but a quirk of how it reads a comma expression made it skip that step, so later code used a pointer that was never set up properly. That kind of bad pointer can crash the graphics process and, where that process is not isolated, may let an attacker break out of the browser's protection.

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.