Skip to content
Memory corruption Advisory Advanced CVE-2026-13975

Out of bounds read in ANGLE (CVE-2026-13975)

A type mismatch in ANGLE's Metal backend causes signed baseVertex values to be zero-extended instead of sign-extended, leading to incorrect GPU memory offsets during vertex fetching. A compromised renderer could potentially perform out-of-bounds reads from GPU memory.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 46 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A type mismatch in ANGLE's Metal backend causes signed baseVertex values to be zero-extended when passed to the Metal API. This results in incorrect GPU memory offsets during vertex fetching, potentially allowing a compromised renderer to perform out-of-bounds reads from GPU memory.

Affected files:

  • third_party/angle/src/libANGLE/renderer/metal/mtl_command_buffer.mm
  • third_party/angle/src/libANGLE/renderer/metal/ContextMtl.mm

Estimated timestamp from git blame: Unknown (Google3 checkout)

Summary

A potential sign-extension vulnerability exists in ANGLE's Metal backend implementation of indexed draw calls. The baseVertex parameter, which is a signed integer in OpenGL ES and the Metal API, is incorrectly treated as an unsigned 32-bit integer within ANGLE's internal command stream. On 64-bit platforms, this causes negative baseVertex values to be zero-extended rather than sign-extended, leading to extremely large positive offsets during GPU vertex fetching.

Technical Details

The vulnerability exists in the transition between ANGLE's front-end and the Metal back-end encoder:

  1. Entry Point: ContextMtl::drawElementsImpl in third_party/angle/src/libANGLE/renderer/metal/ContextMtl.mm receives the baseVertex parameter as a signed GLint (32-bit signed).
  2. Type Mismatch: It calls RenderCommandEncoder::drawIndexedInstancedBaseVertexBaseInstance in third_party/angle/src/libANGLE/renderer/metal/mtl_command_buffer.mm. The signature of this method (and its declaration in mtl_command_buffer.h) incorrectly defines baseVertex as a uint32_t (line 2202):
    C++
    RenderCommandEncoder &RenderCommandEncoder::drawIndexedInstancedBaseVertexBaseInstance(
        ...,
        uint32_t baseVertex,
        ...)
    
  3. Command Encoding: The signed value is implicitly cast to uint32_t and pushed into the IntermediateCommandStream (line 2223).
  4. API Invocation: During command execution, DrawIndexedInstancedBaseVertexBaseInstanceCmd fetches the value as a uint32_t (line 361) and passes it to the Metal API:
    OBJECTIVE-C
    [encoder drawIndexedPrimitives:primitiveType
                        indexCount:indexCount
                         indexType:indexType
                       indexBuffer:indexBuffer
                 indexBufferOffset:bufferOffset
                     instanceCount:instances
                        baseVertex:baseVertex // baseVertex is uint32_t here
                      baseInstance:baseInstance];
    

On 64-bit macOS and iOS, the baseVertex parameter of drawIndexedPrimitives is an NSInteger (64-bit signed). When a uint32_t value like 0xFFFFFFFB (-5) is passed to a 64-bit NSInteger, it is zero-extended to 0x00000000FFFFFFFB (4,294,967,291) instead of being sign-extended to 0xFFFFFFFFFFFFFFFB (-5).

Impact

The GPU uses this zero-extended value to calculate vertex fetch addresses. For an index i, the effective index becomes i + 4,294,967,291. This causes the GPU to fetch vertex data from memory far beyond the bounds of the intended buffer (approximately 4GB offset).

Since the Metal backend advertises robustBufferAccessBehaviorKHR = false in DisplayMtl.mm (line 990), the driver is not required to clamp these accesses. This primitive could be used by a compromised renderer to disclose cross-origin GPU process memory.

Reachability

A compromised renderer can potentially trigger this path by enabling the GL_ANGLE_base_vertex_base_instance extension via the RequestExtensionCHROMIUM command. This extension is listed as requestable in the passthrough command decoder (gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc, line 278).

Suggested Potential Reproduction Steps

  1. From a compromised renderer (or with --enable-webgl-draft-extensions), enable the GL_ANGLE_base_vertex_base_instance extension using glRequestExtensionCHROMIUM.
  2. Create a small vertex buffer and bind it to an attribute.
  3. Create an index buffer with valid indices (e.g., [0, 1, 2]).
  4. Issue a draw call with a negative baseVertex: glDrawElementsInstancedBaseVertexBaseInstanceANGLE(..., -1, 0).
  5. Observe that the GPU fetches vertices from an out-of-bounds offset (~4GB).

Proposed Fix

Change the baseVertex parameter type from uint32_t to int32_t (or GLint) in the following locations:

  • RenderCommandEncoder::drawIndexedInstancedBaseVertexBaseInstance signature in mtl_command_buffer.h and mtl_command_buffer.mm.
  • The fetch and push logic in DrawIndexedInstancedBaseVertexBaseInstanceCmd and its corresponding encoder method in mtl_command_buffer.mm.

Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 baseVertex parameter is declared as uint32_t instead of int32_t in the Metal command encoder, causing negative values to be zero-extended when passed to the Metal API.

Impact

A compromised renderer could potentially disclose cross-origin GPU process memory, as the Metal backend does not enforce robust buffer access.

What the attacker needed

Compromised renderer or WebGL draft extensions enabled

The fix

The baseVertex parameter type should be changed from uint32_t to int32_t in the relevant Metal command buffer methods.

How it was found

  1. Enable the GL_ANGLE_base_vertex_base_instance extension using glRequestExtensionCHROMIUM.
  2. Create a small vertex buffer and bind it to an attribute.
  3. Create an index buffer with valid indices.
  4. Issue a draw call with a negative baseVertex.
  5. Observe that the GPU fetches vertices from an out-of-bounds offset.

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.

In graphics programming, a 'baseVertex' is an offset added to indices when drawing. If it's negative, it should move backwards in memory. Here, a coding mistake treats it as a huge positive number instead, so the GPU reads from far outside the intended buffer. This could let an attacker who already controls the renderer process read sensitive data from GPU 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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.