Insufficient validation of untrusted input in ANGLE (CVE-2026-14401)
ANGLE's validation for YUV framebuffers incorrectly checks a legacy blend state that is not updated by indexed state setters, allowing blending to be enabled when it should be forbidden. An attacker could pass invalid state to the graphics driver, potentially causing undefined behaviour or a sandbox escape on Android.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 48 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 frontend validation allows rendering to YUV framebuffers with blending or partial color masks enabled, violating the EXT_yuv_target specification. This occurs because the validation layer checks a legacy state object that is not synchronized with modern indexed state setters. Submitting this invalid state to a graphics driver can result in undefined behavior or potential sandbox escape on Android.
Affected files:
third_party/angle/src/libANGLE/validationES.cppthird_party/angle/src/libANGLE/State.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_format_utils.cpp
Estimated timestamp from git blame: 2020-11-03
Summary
ANGLE's validation for the EXT_yuv_target extension contains a potential logic error that allows applications to bypass mandatory restrictions when rendering to YUV framebuffers. Specifically, the extension requires that blending be disabled and that all color mask components (Red, Green, Blue, Alpha) be set to true. ANGLE attempts to enforce this during draw calls, but it incorrectly relies on a legacy, non-indexed state object (mBlendState) that is not updated by indexed state-setting functions (e.g., glEnableiOES, glColorMaskiOES).
Root Cause Analysis
In third_party/angle/src/libANGLE/validationES.cpp, the function ValidateDrawStates performs the following check for YUV framebuffers:
// validationES.cpp:4134
bool framebufferIsYUV = framebuffer->hasYUVAttachment();
if (ANGLE_UNLIKELY(framebufferIsYUV))
{
const BlendState &blendState = state.getBlendState(); // Retrieves legacy mBlendState
if (!blendState.colorMaskRed || ...)
return kInvalidColorMaskForYUV;
if (blendState.blend)
return kInvalidBlendStateForYUV;
}
However, the PrivateState class in libANGLE/State.cpp maintains two sets of blend state: mBlendState (legacy, for index 0) and mBlendStateExt (modern, indexed). While non-indexed calls like glEnable(GL_BLEND) update both, the indexed versions used in modern OpenGL ES only update the extended state:
// State.cpp:714
void PrivateState::setBlendIndexed(bool enabled, GLuint index)
{
// ... PLS checks ...
mSetBlendIndexedInvoked = true;
mBlendStateExt.setEnabledIndexed(index, enabled); // Legacy mBlendState is NOT updated
mDirtyBits.set(state::DIRTY_BIT_BLEND_ENABLED);
}
A similar desynchronization exists for setColorMaskIndexed. Consequently, if an application uses glEnableiOES(GL_BLEND, 0) on a YUV framebuffer, the validation check re-reads the stale mBlendState.blend (which defaults to false) and incorrectly passes.
Security Impact
By bypassing this validation, a compromised renderer can pass forbidden state to the underlying graphics driver. In the Vulkan backend, ANGLE uses the correct indexed state (mBlendStateExt) to build the pipeline, leading it to create a VkPipeline with blendEnable = VK_TRUE for a YUV/external attachment. This is a violation of Vulkan Valid Usage requirements (e.g., VUID-VkPipelineColorBlendAttachmentState-blendEnable-00601).
On Android, the GPU process is typically unsandboxed. Submitting invalid state that violates Vulkan invariants can lead to driver-dependent memory corruption or undefined behavior, providing a potential vector for sandbox escape.
Potential Steps to Reproduce
- Initialize an ANGLE context on a device supporting
GL_EXT_yuv_targetandGL_OES_draw_buffers_indexed(common on Android Vulkan). - Bind a YUV external texture to a framebuffer's color attachment.
- Call
glEnableiOES(GL_BLEND, 0)to enable blending via the indexed setter. - Issue a draw call (e.g.,
glDrawArrays). - Observe that the draw call proceeds without the expected
GL_INVALID_OPERATIONerror.
Suggested Fix
The validation logic in ValidateDrawStates should be updated to check the modern mBlendStateExt object instead of the legacy mBlendState. Alternatively, setBlendIndexed and setColorMaskIndexed should ensure that mBlendState is kept in sync when the index is 0.
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 validation function reads a legacy blend state object that is not synchronised with the indexed state setters used by modern OpenGL ES calls.
Impact
On Android, where the GPU process is typically unsandboxed, submitting invalid state that violates Vulkan invariants could lead to driver-dependent memory corruption or undefined behaviour, providing a potential vector for sandbox escape.
What the attacker needed
Device supporting GL_EXT_yuv_target; device supporting GL_OES_draw_buffers_indexed; ability to run a malicious application
The fix
The validation logic should be updated to check the modern indexed blend state object instead of the legacy one, or the indexed setters should keep the legacy state in sync when the index is 0.
How it was found
- Initialize an ANGLE context on a device supporting the required extensions.
- Bind a YUV external texture to a framebuffer's color attachment.
- Call the indexed blend enable function for index 0.
- Issue a draw call.
- Observe that the draw call proceeds without the expected error.
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 graphics commands for different systems. It has a rule that when drawing to a special kind of framebuffer (YUV), blending must be turned off. The code checked an old setting that didn't get updated when a newer command was used, so the rule could be bypassed. This could let a malicious program send bad instructions to the graphics driver, which might crash or be exploited.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.