Out of bounds read in ANGLE (CVE-2026-17701)
The ANGLE Metal backend on macOS does not advertise robust context creation support, so Chrome silently drops the robust buffer access attribute when creating GLES2 contexts. A compromised renderer could then bypass draw-call bounds validation and potentially read out-of-bounds GPU buffer data belonging to other origins.
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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A potential out-of-bounds GPU buffer read vulnerability exists in the ANGLE Metal backend on macOS. This issue is caused by the silent omission of the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT attribute when Chrome creates GL contexts because the Metal backend does not advertise EGL_EXT_create_context_robustness. A compromised renderer process could potentially bypass all draw-call bounds validation under the passthrough command decoder, leading to cross-origin GPU data exposure.
Affected files:
third_party/angle/src/libANGLE/renderer/metal/DisplayMtl.mmui/gl/gl_context_egl.ccthird_party/angle/src/libANGLE/Context.cppthird_party/angle/src/libANGLE/validationES.hgpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
Estimated timestamp from git blame: 2024-01-25
Description
A compromised renderer process can potentially bypass draw-call bounds validation under the OpenGL ES 2.0 passthrough decoder on macOS. This behavior arises from a silent fallback during EGL context initialization where robust buffer access is omitted because ANGLE's Metal display backend does not advertise EGL_EXT_create_context_robustness support.
Vulnerability Mechanics & Root Cause
-
Context Creation & Mojo Deserialization: A compromised renderer can request a GLES2 command buffer by calling
mojom::GpuChannel::CreateCommandBufferwithattribs.context_typeset toContextType::kOpenGLES2(which is permitted and successfully deserialized bycontext_type_mojom_traits.h). Because the requested context type is not WebGL,webgl_compatibility_contextevaluates tofalseinGenerateGLContextAttribsForDecoder(gpu/command_buffer/service/service_utils.cc). -
Omission of Robust Buffer Access: Inside
GLContextEGL::InitializeImpl(ui/gl/gl_context_egl.cc), context attributes are only populated withEGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXTif the display advertisesb_EGL_EXT_create_context_robustness. On macOS with the default ANGLE Metal backend,DisplayMtl::generateExtensions(third_party/angle/src/libANGLE/renderer/metal/DisplayMtl.mm) does not definecreateContextRobustness. As a result, the robust buffer access attribute is silently dropped during context creation. -
Bypassing Validation in ANGLE: The created ANGLE context has both
mState.isWebGL()andmState.hasRobustAccess()set tofalse. Inside ANGLE'sContext::init(third_party/angle/src/libANGLE/Context.cpp), this causes bothmRequiresRobustBehaviorandmBufferAccessValidationEnabledto resolve tofalse. Consequently, validation entry points (such asValidateDrawArraysAttribsinthird_party/angle/src/libANGLE/validationES.h) immediately returntruewithout verifying vertex array and index bounds against bound buffer sizes. -
Potential GPU Out-Of-Bounds Read: Because the passthrough command decoder forwards drawing operations directly to ANGLE, and ANGLE bypasses CPU-side validation, raw vertex arrays are bound and sent directly to the Metal render command encoder. Since no hardware-level robust access was configured, the GPU vertex fetcher can read out-of-bounds. Given that a global texture and semaphore share group is enabled in the passthrough command decoder, this out-of-bounds read can potentially leak adjacent cross-origin GPU buffer and texture data from other tabs or contexts.
Suggested Potential Reproduction Steps
Note: The following are suggested/potential reproduction steps because our tooling agent does not have the ability to run code or verify a live proof of concept.
- From a compromised renderer on macOS, open a GpuChannel and request a command buffer with
CreateCommandBufferParams.attribsset toContextType::kOpenGLES2(with WebGL compatibility context set to false). - Create and bind a small
GL_ARRAY_BUFFER(e.g., 16 bytes) and configure a vertex attribute pointing to it. - Attach a vertex shader that reads from this attribute and writes the value to a varying or render target.
- Call
glDrawArrayswith a count parameter exceeding the buffer boundary (e.g.,count = 1 << 16). - Retrieve the read data by rendering to a framebuffer and executing
glReadPixelsto inspect potential cross-origin GPU memory content.
Suggested Fix
Support robust context creation in ANGLE's Metal backend. This can be achieved by implementing robust buffer access behavior or by defining outExtensions->createContextRobustness = true; in DisplayMtl::generateExtensions (third_party/angle/src/libANGLE/renderer/metal/DisplayMtl.mm) and ensuring that appropriate robust emulation or bounds checks are enforced during draw setup if robust access is requested.
Evaluated with Chrome root at commit: fb72408a8493c46bc75fae1c70d03daec96b3040
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 Metal backend does not advertise the robust context creation extension, so the robust access attribute is silently omitted and ANGLE disables its buffer bounds validation.
Impact
A compromised renderer could potentially read out-of-bounds GPU buffer and texture data from other tabs or contexts; the report notes the steps are suggested and unverified.
What the attacker needed
MacOS with ANGLE Metal backend; compromised renderer process; no verified proof of concept
The fix
The Metal backend should support robust context creation, either by implementing robust buffer access or by advertising the extension and enforcing bounds checks during draw setup.
How it was found
- From a compromised renderer, request a GLES2 command buffer with a non-WebGL context type.
- Create and bind a small array buffer and set up a vertex attribute pointing at it.
- Use a vertex shader that reads the attribute and writes it to a varying or render target.
- Call a draw with a vertex count far larger than the buffer.
- Read back the rendered result to inspect possible cross-origin GPU 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.
A web browser splits work into processes, and one of them draws graphics on the GPU. Normally the graphics layer checks that drawing commands stay inside the memory the page is allowed to use. Here that check was switched off by accident on macOS, so a malicious page that has already broken out of its own process could make the GPU read memory it should not see, possibly from other tabs.
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.