Out of bounds read in ANGLE (CVE-2026-11061)
ANGLE's GLSL translator builds mangled names for structs by concatenating the struct name and its field list without a separator, so two different structs can produce the same mangled name. This type confusion mutates function prototypes and causes ANGLE to emit type-mismatched SPIR-V that bypasses validation and is passed to the GPU driver, potentially leading to memory corruption and a sandbox escape.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
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 security team.
Overview: ANGLE's GLSL translator lacks a separator between a struct's name and its mangled field list, allowing distinct structs to produce identical mangled names. This type confusion mutates function prototypes, leading to the generation of type-mismatched SPIR-V code that bypasses validation and is passed to the GPU driver.
Affected files:
third_party/angle/src/compiler/translator/Types.cppthird_party/angle/src/compiler/translator/SymbolTable.cppthird_party/angle/src/compiler/translator/ParseContext.cppthird_party/angle/src/compiler/translator/Symbol.cppthird_party/angle/src/compiler/translator/spirv/OutputSPIRV.cpp
Estimated timestamp from git blame: 2018-03-13
Summary
A potential vulnerability in ANGLE's GLSL translator allows an attacker to cause a mangled-name collision between structurally distinct structs. This can be abused to trigger type confusion in the compiler's symbol table, resulting in ANGLE generating invalid SPIR-V instructions. Because ANGLE disables SPIR-V validation in release builds, the malformed instructions are passed directly to the underlying GPU driver. This could potentially lead to driver-level memory corruption and a GPU process sandbox escape.
Note: These steps are based on static code analysis; a working Proof of Concept has not yet been executed by our tooling.
Root Cause Analysis
In third_party/angle/src/compiler/translator/Types.cpp, TType::buildMangledName() constructs a mangled name for a struct by concatenating "{s", the struct name, and the mangledFieldList() without any delimiter. Since the mangled field list uses standard alphanumeric characters, two distinct structs can produce the exact same mangled string.
For example:
struct A00B { vec4 y; }(Name:A00B, Field:vec4mangles to30B) -> Mangled Name:0{sA00B30B}struct A { float x; vec4 y; }(Name:A, Fields:floatmangles to00B,vec4to30B) -> Mangled Name:0{sA00B30B}
Potential Exploitation Steps
An attacker could exploit this type confusion by supplying a malicious WebGL shader:
- The shader defines the two colliding structs, a function prototype
void foo(A00B p);, and a function definitionvoid foo(A p) { ... }. - During parsing, ANGLE computes identical mangled names for both the prototype and the definition (e.g.,
foo(0{sA00B30B}). - In
ParseContext.cpp, the definition is mapped to the existing prototype.TSymbolTable::setFunctionParameterNamesFromDefinitionis called, which invokesfirstDeclaration->shareParameters(*function). TFunction::shareParametersperforms a shallow copy of the definition's parameter pointers (mParameters) onto the prototype. The prototype is now mutated and internally expects an argument of typestruct Ainstead ofstruct A00B.- The attacker calls
foo(v)insidemain()with an argumentvof typestruct A00B. The parser matches this call to the mutated prototype because the mangled names match. - During SPIR-V translation (
spirv/OutputSPIRV.cpp),createFunctionCallallocates a temporary variable for the expected parameter type (struct A*). - It then emits an
OpStoreinstruction storing the caller's argument object (struct A00B) into the temporary variable (struct A*). - This violates the SPIR-V specification, which strictly requires the object type to match the pointer's pointed-to type.
- In Release builds of Chromium,
spirv::Validate()is skipped (it relies onASSERTand aconstexprflag that disables it outside of debug builds). The malformed SPIR-V is handed off to the Vulkan driver. - GPU driver compilers generally trust the validation phase of the front-end toolchain. Interpreting an
A00Bobject as anAobject in memory can lead to out-of-bounds memory accesses or memory corruption within the highly privileged GPU process.
Suggested Fix
Update TType::buildMangledName() in src/compiler/translator/Types.cpp to include a unique delimiter (such as - or ;) between the struct name and the field list.
For example:
mangledName += mStructure->name().data();
mangledName += '-'; // Add delimiter
mangledName += mStructure->mangledFieldList();
This ensures that structurally distinct structs will always have unique mangled names.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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.
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 mangled name for a struct is built by concatenating the struct name and its field list without any delimiter, so distinct structs can collide.
Impact
This could potentially lead to driver-level memory corruption and a GPU process sandbox escape, though the report notes that a working proof of concept has not yet been executed.
What the attacker needed
Ability to supply a WebGL shader; release build of Chromium (validation skipped)
The fix
The mangled name construction should be updated to include a unique delimiter between the struct name and the field list.
How it was found
- The shader defines two colliding structs, a function prototype using one, and a function definition using the other.
- ANGLE computes identical mangled names for both the prototype and the definition.
- The definition is mapped to the existing prototype and shareParameters shallow-copies the definition's parameter pointers onto the prototype.
- The attacker calls the function with an argument of the other struct type, and the parser matches it to the mutated prototype.
- During SPIR-V translation, an OpStore instruction stores the caller's argument into a temporary variable of the expected parameter type.
- In release builds, SPIR-V validation is skipped and the malformed code is passed to the GPU 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.
When a shader is compiled, the compiler gives each data type a unique internal name. Here, two different types could accidentally get the same name because the naming scheme did not put a separator between parts. That mix-up could make the compiler produce invalid instructions for the graphics card, which might crash or corrupt memory.
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.