Insufficient validation of untrusted input in ANGLE (CVE-2026-17671)
ANGLE's validation layer fails to enforce that when an advanced blend equation is used on one draw buffer, all other enabled draw buffers must have blending disabled. A compromised renderer could issue draw calls that violate Vulkan Valid Usage, potentially causing memory corruption in the GPU process and, on Android, a sandbox escape.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 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 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 validation gap in ANGLE allows draw calls with mixed advanced and standard blend operations, violating Vulkan Valid Usage requirements. This malformed state can trigger undefined behavior or memory corruption in Vulkan drivers within the GPU process. On Android, where the GPU process is typically unsandboxed, this could facilitate a sandbox escape.
Affected files:
third_party/angle/src/libANGLE/validationES.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_cache_utils.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_renderer.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
Estimated timestamp from git blame: 2022-02-23
Summary
A potential vulnerability exists in ANGLE's OpenGL ES validation layer where it fails to enforce strict Multi-Render Target (MRT) restrictions when using advanced blend equations (from GL_KHR_blend_equation_advanced). This allows a compromised renderer to issue draw calls that violate the underlying Vulkan API's Valid Usage IDs (VUIDs), potentially leading to memory corruption in the GPU process.
Root Cause Analysis
The issue stems from incomplete validation in ValidateDrawStates within third_party/angle/src/libANGLE/validationES.cpp. The OpenGL ES 3.2 specification (§17.3.6.2) and the GL_KHR_blend_equation_advanced extension require that if any enabled draw buffer uses an advanced blend equation, all other enabled draw buffers must have blending disabled.
However, ANGLE's current implementation only verifies that no more than one draw buffer uses an advanced blend equation:
// third_party/angle/src/libANGLE/validationES.cpp:4168
for (size_t drawBufferIndex : blendStateExt.getUsesAdvancedBlendEquationMask())
{
if (drawBufferIndex < drawBufferCount && ...)
{
++advancedBlendRenderTargetCount;
}
}
if (advancedBlendRenderTargetCount > 1)
return kAdvancedBlendEquationWithMRT;
This logic fails to check if other enabled draw buffers (which might use standard equations like GL_FUNC_ADD) have blending enabled. Consequently, the Vulkan backend generates a VkPipelineColorBlendStateCreateInfo containing mixed blendEnable and colorBlendOp states.
On hardware where advancedBlendIndependentBlend is VK_FALSE (common on many mobile and NVIDIA GPUs), using an advanced blend op with other attachments having blendEnable = VK_TRUE is a violation of Vulkan Valid Usage. Additionally, advanced blend operations strictly require specific source and destination factors (VK_BLEND_FACTOR_SRC_ALPHA and VK_BLEND_FACTOR_DST_ALPHA), but ANGLE does not prevent an attacker from setting invalid factors via glBlendFunc for these attachments.
Potential Impact
Passing these invalid states to vkCreateGraphicsPipelines can cause the driver's pipeline compiler to enter an undefined state, potentially resulting in heap overflows or other memory corruption within the GPU process. On platforms like Android where the GPU process often runs without a full sandbox, this could lead to an elevation of privilege or sandbox escape.
Suggested Reproducer Steps
- In a compromised renderer, initialize an ANGLE GLES context with
GL_KHR_blend_equation_advancedandGL_OES_draw_buffers_indexedsupport. - Create an FBO with two color attachments and set
glDrawBuffers(2, ...). - Enable blending for both:
glEnablei(GL_BLEND, 0)andglEnablei(GL_BLEND, 1). - Set attachment 0 to use an advanced equation:
glBlendEquationi(0, GL_MULTIPLY). - Set attachment 1 to use a standard equation:
glBlendEquationi(1, GL_FUNC_ADD). - (Optionally) Set invalid factors for the advanced attachment:
glBlendFunci(0, GL_ONE, GL_ONE). - Execute a draw call (
glDrawArrays).
Proposed Fix
Update ValidateDrawStates in validationES.cpp to verify that if blendStateExt.getUsesAdvancedBlendEquationMask().any() is true, then for all drawBufferIndex < drawBufferCount where the draw buffer is not GL_NONE, blendStateExt.getEnabledMask().test(drawBufferIndex) must be false, EXCEPT for the single index using the advanced blend equation.
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 logic only counts how many draw buffers use an advanced blend equation but does not check whether other enabled draw buffers have blending enabled, allowing a mixed state that violates Vulkan rules.
Impact
Passing these invalid states to the driver could cause heap overflows or other memory corruption in the GPU process, and on Android where the GPU process is often unsandboxed, this could lead to a sandbox escape.
What the attacker needed
Compromised renderer; ANGLE with advanced blend support; Vulkan driver without independent blend
The fix
The validation should be updated to ensure that if any draw buffer uses an advanced blend equation, all other enabled draw buffers have blending disabled.
How it was found
- Initialize an ANGLE GLES context with advanced blend and indexed draw buffers support.
- Create a framebuffer with two colour attachments and set both as draw buffers.
- Enable blending for both attachments.
- Set attachment 0 to use an advanced blend equation.
- Set attachment 1 to use a standard blend equation.
- Execute a draw call.
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 translation layer that lets web graphics code run on different GPUs. It is supposed to check that the graphics commands it receives are safe before passing them to the GPU driver. This report says a check is missing, so a malicious program could send a bad command that confuses the GPU driver and possibly crashes or takes over the GPU process.
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.