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

Insufficient validation of untrusted input in ANGLE (CVE-2026-9969)

ANGLE's GLSL parser accepts global variables declared with only an interpolation qualifier, bypassing validation and generating malformed SPIR-V. This invalid SPIR-V is passed to the host Vulkan driver, potentially causing memory corruption in the GPU process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 32 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: ANGLE's GLSL parser fails to reject global variables declared with only an interpolation qualifier (e.g., centroid). This bypasses semantic validation and generates malformed SPIR-V in release builds, which is passed to the host Vulkan driver and can potentially cause memory corruption in the GPU process.

Affected files:

  • third_party/angle/src/compiler/translator/spirv/OutputSPIRV.cpp
  • third_party/angle/src/compiler/translator/QualifierTypes.cpp
  • third_party/angle/src/compiler/translator/ParseContext.cpp
  • third_party/angle/src/compiler/translator/util.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/spv_utils.cpp

Estimated timestamp from git blame: 2024-05-28

Description

A potential vulnerability exists in ANGLE's GLSL frontend where it fails to properly validate and reject global variable declarations that use a bare interpolation or auxiliary qualifier (such as centroid, flat, or smooth) without a corresponding storage qualifier like in or out.

Root Cause Analysis

When parsing a declaration like centroid float bogus; at the global scope:

  1. Qualifier Merging (QualifierTypes.cpp): The parser initially assigns a base scope qualifier of EvqGlobal. During qualifier merging in JoinVariableStorageQualifier (lines 353-355), the EvqGlobal state is directly overwritten by the EvqCentroid qualifier.
  2. Validation Bypass (ParseContext.cpp): The variable is declared with the EvqCentroid qualifier, which is marked as an "Incomplete" qualifier in BaseTypes.h because it lacks a direction (In/Out). Semantic checks like checkVaryingLocations rely on helpers like IsVaryingIn() (in util.cpp), which return false for incomplete qualifiers. Thus, the invalid variable silently bypasses structural validation and is added to the AST.
  3. SPIR-V Generation (OutputSPIRV.cpp): During SPIR-V generation, GetStorageClass attempts to resolve a SPIR-V storage class for EvqCentroid. Lacking a specific case, it falls through to the default: branch. This branch contains an assertion (ASSERT(type.getInterfaceBlock() != nullptr || qualifier == EvqUniform);) that catches the error in debug builds. However, in official release builds (ANGLE_ENABLE_ASSERTS is undefined), the assertion is a no-op, and the function incorrectly returns spv::StorageClassUniform.
  4. Malformed SPIR-V: The variable is emitted with the Uniform storage class but, because its basic type is EbtFloat and not EbtInterfaceBlock, it is not decorated with the mandatory Block decoration, directly violating Vulkan SPIR-V validation rule VUID-StandaloneSpirv-Uniform-06807.

Impact

This vulnerability allows a malicious webpage (via WebGL or WebGPU) to provide structurally invalid SPIR-V to the host Vulkan driver via vkCreateShaderModule. Depending on the robustness of the vendor-specific Vulkan driver's shader compiler, processing this malformed input can potentially lead to out-of-bounds memory access or memory corruption. Because the Vulkan driver executes within Chrome's GPU process—which is unsandboxed on platforms like Android—this could lead to full remote code execution (RCE) and system compromise.

Potential Reproduction Steps

(Note: These are suggested steps to trigger the compilation bug; a full driver exploit requires a vulnerable vendor driver)

  1. Use a browser using ANGLE's Vulkan backend.
  2. Compile a vertex shader with a bare interpolation qualifier:
    GLSL
    #version 300 es
    precision mediump float;
    centroid float bogus;
    void main() { gl_Position = vec4(bogus); }
    
  3. Link the program. In a release build, the malformed SPIR-V is generated and passed to the Vulkan driver.

Suggested Fix

Update TParseContext::declareVariable or GetVariableTypeQualifierFromSortedSequence to explicitly reject global variable declarations that result in incomplete qualifiers (like EvqCentroid, EvqFlat, EvqSmooth) without a corresponding In or Out storage qualifier.

Evaluated with Chrome root at commit: a1e33f5848218e21d4a16ae2c1bc94e815c30c7f


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

Likely the parser overwrites the global storage qualifier with an incomplete interpolation qualifier and later fails to handle it during SPIR-V generation, emitting an invalid storage class.

Impact

A malicious webpage could potentially cause out-of-bounds memory access or memory corruption in the GPU process, and on unsandboxed platforms like Android this could lead to remote code execution.

What the attacker needed

Browser with ANGLE Vulkan backend; victim visits malicious webpage; vulnerable vendor Vulkan driver

The fix

The parser should be updated to explicitly reject global variable declarations that result in incomplete qualifiers without a corresponding In or Out storage qualifier.

How it was found

  1. Use a browser using ANGLE's Vulkan backend.
  2. Compile a vertex shader with a bare interpolation qualifier.
  3. Link the program; in a release build, malformed SPIR-V is generated and passed to the Vulkan driver.

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.

ANGLE is a component that translates WebGL shader code into a form the graphics driver can understand. The parser did not properly check a certain kind of variable declaration, so it produced invalid instructions for the graphics driver. A malicious webpage could exploit this to crash or take over the graphics process, which on some systems has high privileges.

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.