Uninitialized Use in ANGLE (CVE-2026-11104)
A missing type comparison in ANGLE's OpenGL ES 2.0 texture validation allowed invalid internal format and type combinations to pass. An attacker with a compromised renderer could then read back uninitialised GPU process memory through a texture.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 56 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 security team.
Overview: A logic error in ANGLE's OpenGL ES 2.0 validation allows invalid texture internal format and type combinations to be accepted. This bypasses validation and causes backend rendering engines to use a no-op fallback load function, resulting in uninitialized staging memory containing stale GPU process data being uploaded to the texture. This can lead to a cross-process information disclosure.
Affected files:
third_party/angle/src/libANGLE/validationES2.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cppthird_party/angle/src/libANGLE/renderer/metal/TextureMtl.mmthird_party/angle/src/libANGLE/renderer/d3d/d3d11/Image11.cpp
Estimated timestamp from git blame: 2024-12-03
Description
A typo in ANGLE's glTexImage2D validation logic allows invalid combinations of texture internal formats and types to bypass parameter checking, potentially leading to a cross-process information leak of uninitialized GPU memory.
In third_party/angle/src/libANGLE/validationES2.cpp, within ValidateES2TexImageParametersBase, there is a missing type == comparison when validating the GL_RGB565_OES and GL_RGB8_OES internal formats if the GL_EXT_texture_type_2_10_10_10_REV extension is present.
Specifically, at lines 1491 and 1505:
1491: GL_UNSIGNED_INT_2_10_10_10_REV_EXT && format == GL_RGB)
...
1505: GL_UNSIGNED_INT_2_10_10_10_REV_EXT && format == GL_RGB)
Because GL_UNSIGNED_INT_2_10_10_10_REV_EXT is used as a bare expression, the compiler evaluates its constant value (0x8368). Since this is non-zero, the condition evaluates to true as long as format == GL_RGB. This erroneously sets nonEqualFormatsAllowed = true, bypassing the strict OpenGL ES 2.0 requirement that internalformat must match format (line 1753), and allowing invalid types like GL_FLOAT to be accepted.
Chrome's WebGL passthrough command decoder delegates all texture parameter validation to ANGLE via robust entry points, so this invalid state propagates to the ANGLE backends (Vulkan, Metal, D3D11).
When the backend attempts to load the image data, it queries for a conversion function based on the invalid combination (e.g., GL_RGB565 + GL_FLOAT). Because this combination is invalid, the auto-generated load function tables fall back to the default switch case, which returns UnreachableLoadFunction.
In Chromium Release builds, UnreachableLoadFunction evaluates to a complete no-op. Consequently, the staging buffers allocated to hold the incoming pixel data prior to GPU transfer are never written to. These staging buffers are often suballocated from shared pools (e.g., via VMA in Vulkan) and contain stale, uninitialized data from previous GPU process operations.
Because the attacker provided a non-null pixels array, ANGLE marks the texture state as InitState::Initialized (third_party/angle/src/libANGLE/Texture.cpp:49), which bypasses ANGLE's robust resource initialization that would otherwise zero-clear the texture. The uninitialized staging buffer is then copied to the GPU texture, allowing a compromised renderer to read back the leaked GPU memory.
Potential Reproduction Steps
These are suggested steps an attacker would follow to trigger the vulnerability from a compromised renderer process or malicious JavaScript:
- Create a WebGL 1.0 (OpenGL ES 2.0) context.
- Request and enable the required extensions:
GL_OES_required_internalformat,GL_EXT_texture_type_2_10_10_10_REV, andGL_OES_texture_float. - Call
gl.texImage2Dwith:target:GL_TEXTURE_2Dinternalformat:GL_RGB565_OES(orGL_RGB8_OES)format:GL_RGBtype:GL_FLOATpixels: A non-nullFloat32Arrayof appropriate size.
- Due to the typo, ANGLE validation passes. The backend uses the no-op
UnreachableLoadFunction, leaving staging memory uninitialized. - Bind the resulting texture to a Framebuffer Object (FBO).
- Call
gl.readPixels()to exfiltrate the uninitialized GPU-process memory back to the attacker.
Suggested Fix
Correct the logic in third_party/angle/src/libANGLE/validationES2.cpp for the GL_RGB565_OES and GL_RGB8_OES cases by adding the missing type == comparison:
// At lines 1491 and 1505:
- GL_UNSIGNED_INT_2_10_10_10_REV_EXT && format == GL_RGB)
+ type == GL_UNSIGNED_INT_2_10_10_10_REV_EXT && format == GL_RGB)
Evaluated with Chrome root at commit: 137d451a126685dd5010e6609db9f6d4a78d8234
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
A missing 'type ==' comparison meant a constant was used as a bare expression, so the validation condition was always true and invalid format/type pairs were accepted.
Impact
A compromised renderer could read stale GPU process memory, leading to cross-process information disclosure.
What the attacker needed
Compromised renderer process; WebGL 1.0 context; required extensions enabled
The fix
The validation should add the missing type comparison so that the extension constant is only checked when the type matches.
How it was found
- Create a WebGL 1.0 context.
- Enable the required extensions.
- Call texImage2D with an invalid internal format and type combination and a non-null pixel array.
- Bind the texture to a framebuffer object.
- Call readPixels to read back the leaked memory.
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 web page draws 3D graphics, the browser's graphics layer checks the requests it receives. Here a check was written incorrectly, so a bad request was accepted. The graphics card then used a memory buffer that had not been cleared, and the page could read leftover data from other processes.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.