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
- 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.cppthird_party/angle/src/compiler/translator/ParseContext.cppthird_party/angle/src/compiler/translator/tree_ops/RewritePixelLocalStorage.cppthird_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:
-
Missing Opaque Type Check in
TParseContext::addComma: Insrc/compiler/translator/ParseContext.cpp, theaddCommafunction does not invokebinaryOpCommonCheck. Unlike other binary expressions, it fails to reject operands with opaque types. This allows expressions like(i++, pls)(whereplsis apixelLocalANGLEuniform) to be parsed as a valid AST node, even though opaque types are prohibited as operands to the sequence operator. -
Incorrect Traversal in
GetBaseUniform: Insrc/compiler/translator/tree_ops/MonomorphizeUnsupportedFunctions.cpp, theGetBaseUniformhelper 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,GetBaseUniformencounters the side-effect (e.g.,i++) instead of the uniform. This causes the function to returnnullptr, preventing theMonomorphizeUnsupportedFunctionspass from specializing the function call. -
Map Iterator Dereference in
RewritePixelLocalStorage: TheRewritePixelLocalStoragepass 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). WhenPLSBackingStoreMap::findattempts to look up this binding:C++ auto iter = mMap.find(binding); // binding is -1 return iter->second; // Dereferences mMap.end() in release buildsDereferencing the
end()iterator returns a wildTVariable*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:
#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
- Update
TParseContext::addCommainParseContext.cppto include opaque type checks, similar tobinaryOpCommonCheckoraddTernarySelection. - Correct
GetBaseUniforminMonomorphizeUnsupportedFunctions.cppto handleEOpCommaby descending into the right operand instead of the left. - Harden
PLSBackingStoreMap::findinRewritePixelLocalStorage.cppto 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.
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
- Write a fragment shader that enables the pixel local storage extension and declares a pixelLocalANGLE uniform.
- Define a wrapper function that takes a pixelLocalANGLE parameter and loads from it.
- Call the wrapper with a comma expression whose right side is the uniform and whose left side is a side effect.
- 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.