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

Use after free in ANGLE (CVE-2026-7359)

A use-after-free write vulnerability exists in the GPU process passthrough command decoder due to service ID recycling in ANGLE and incorrect client ID resolution for orphaned buffers. A compromised renderer could force a service ID collision to poison the decoder's mapping state and write arbitrary data into freed GPU memory.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 35 days

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: A Use-After-Free (UAF) Write vulnerability potentially exists in the GPU process passthrough command decoder due to service ID recycling in ANGLE and incorrect client ID resolution for orphaned buffers. A compromised renderer can force a service ID collision between an orphaned buffer and a new buffer, poisoning the passthrough decoder's mapping state to write arbitrary data into freed GPU memory.

Affected files:

  • gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
  • gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
  • gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc

Estimated timestamp from git blame: 2025-11-28

Summary

A potential Use-After-Free (UAF) Write vulnerability exists in GLES2DecoderPassthroughImpl. The issue occurs because of a service ID collision when a buffer is orphaned by a Vertex Array Object (VAO). When a buffer is deleted while bound to a non-current VAO, ANGLE immediately recycles its service ID handle even though the buffer object itself remains alive (orphaned). This allows a newly generated buffer to inherit the same service ID. If the orphaned VAO is subsequently used, the passthrough decoder incorrectly attributes the orphan's mapped memory to the new buffer's client ID. This results in a poisoned entry in mapped_buffer_map containing a dangling pointer that can be used to perform arbitrary writes to freed GPU memory when the new buffer is flushed.

Theoretical Exploit Steps

(Note: This is a potential vulnerability identified via static analysis by an AI agent; a working proof-of-concept exploit has not been executed).

A compromised renderer process can potentially trigger this vulnerability using the following sequence of command buffer operations:

  1. Establish the Orphan: The renderer creates VAO 1 (client_vao_1) and Buffer A (client_buf_A). The decoder queries ANGLE for a service ID, receiving service_A. The decoder maps client_buf_A <-> service_A in resources_->buffer_id_map.
  2. The renderer binds VAO 1 and then binds Buffer A to the GL_ELEMENT_ARRAY_BUFFER target. VAO 1 now holds a strong reference to Buffer A in ANGLE.
  3. The renderer unbinds VAO 1 (it is no longer the active VAO) and deletes Buffer A (glDeleteBuffers(1, &client_buf_A)).
  4. In DoDeleteBuffers, the decoder removes the mapping for client_buf_A and calls ANGLE's glDeleteBuffers(1, &service_A). Because Buffer A is not bound to the current context, ANGLE's Context::deleteBuffer immediately releases the ID service_A back to the allocator. However, because VAO 1 still references Buffer A, its reference count is > 0, so the underlying driver memory is not destroyed. Buffer A is now an "orphan."
  5. Force Collision: The renderer immediately creates a new Buffer B (glGenBuffers(1, &client_buf_B)). ANGLE recycles and returns the ID service_A. The decoder maps the new client_buf_B <-> service_A.
  6. Poison Mapping State: The renderer re-binds VAO 1, setting bound_element_array_buffer_dirty_ = true in the decoder.
  7. The renderer sends a glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, ...) command. DoMapBufferRange executes and successfully maps the actual underlying buffer (the orphaned Buffer A) via ANGLE, returning mapped_ptr.
  8. DoMapBufferRange then calls LazilyUpdateCurrentlyBoundElementArrayBuffer(). This queries ANGLE for GL_ELEMENT_ARRAY_BUFFER_BINDING. ANGLE inspects the bound VAO 1 and returns the original service ID of its attached buffer: service_A.
  9. The decoder performs a reverse-lookup: GetClientID(&resources_->buffer_id_map, service_A, ...). Because service_A was recycled, this incorrectly resolves to the client ID of the new buffer: client_buf_B. The decoder updates its tracking: bound_buffers_[GL_ELEMENT_ARRAY_BUFFER] = client_buf_B.
  10. DoMapBufferRange inserts mapped_ptr into resources_->mapped_buffer_map under the key client_buf_B. The decoder now believes Buffer B is mapped, but the pointer actually points to the driver memory of the orphan Buffer A.
  11. Trigger UAF Write: The renderer deletes VAO 1 (glDeleteVertexArraysOES). VAO 1 drops its reference to the orphan Buffer A. Buffer A is destroyed by ANGLE, and the graphics driver frees the backing memory. The mapped_ptr stored under client_buf_B is now a dangling pointer.
  12. The renderer binds Buffer B to GL_ARRAY_BUFFER and invokes glFlushMappedBufferRange(GL_ARRAY_BUFFER, offset, size).
  13. DoFlushMappedBufferRange retrieves the poisoned map_info for client_buf_B and executes an unconstrained memcpy from an attacker-controlled shared memory segment into the dangling map_ptr.

Impact

This vulnerability provides a robust write-what-where primitive in the GPU process. Because the memory is allocated and managed by the underlying graphics driver (e.g., Vulkan/D3D11) rather than Chromium's PartitionAlloc, MiraclePtr (BackupRefPtr) does not protect this pointer. An attacker can leverage this primitive to overwrite reused GPU structures (such as command buffers, shaders, or descriptors) to achieve Code Execution in the GPU process, resulting in a renderer-to-GPU sandbox escape.

Suggested Fix

The core issue is that the passthrough decoder relies on a reverse-lookup (GetClientID) using a service ID that may have been recycled by ANGLE while the underlying buffer object remains alive as an orphan.

Potential fixes include:

  1. Preventing ID Recycling in ANGLE: Modify ANGLE's HandleAllocator to prevent the immediate reuse of a service ID if the underlying RefCountObject (like a Buffer) still has a non-zero reference count (e.g., from an unbound VAO).
  2. Tracking Orphans in the Decoder: The passthrough decoder could track orphaned buffers (buffers that have been deleted but might still be referenced by VAOs). If glGetIntegervFn(GL_ELEMENT_ARRAY_BUFFER_BINDING) returns an ID that belongs to an orphaned buffer, the decoder should handle it safely (e.g., by returning a pseudo-client ID or rejecting the mapping operation).
  3. Validating Client IDs: In LazilyUpdateCurrentlyBoundElementArrayBuffer(), add a verification step to ensure that the resolved client_element_array_buffer actually corresponds to the expected state of the currently bound VAO, rather than blindly trusting the reverse lookup of a potentially recycled service ID.

Evaluated with Chrome root at commit: a3f5fcb392f2902650ca2b71820e7e418787e18b


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. Please feel free to reach out to me if you have concerns or feedback.

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 passthrough decoder relies on a reverse-lookup of a service ID that may have been recycled by ANGLE while the underlying buffer object remains alive as an orphan.

Impact

This vulnerability could provide a write-what-where primitive in the GPU process, potentially leading to code execution and a renderer-to-GPU sandbox escape.

What the attacker needed

Compromised renderer process

The fix

The issue should be fixed by preventing ID recycling in ANGLE, tracking orphaned buffers in the decoder, or validating client IDs during reverse lookup.

How it was found

  1. Create a VAO and a buffer, bind the buffer to the element array target of the VAO.
  2. Unbind the VAO and delete the buffer, causing its service ID to be recycled while the buffer remains orphaned.
  3. Create a new buffer that receives the same service ID.
  4. Re-bind the VAO and map the element array buffer, causing the decoder to associate the orphan's memory with the new buffer's client ID.
  5. Delete the VAO to free the orphaned buffer's memory, leaving a dangling pointer in the decoder's map.
  6. Bind the new buffer to the array buffer target and flush the mapped range, writing to the freed 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.

This report describes a memory safety bug in a graphics component. When a buffer is deleted but still referenced elsewhere, its identifier can be reused, causing the program to mix up old and new buffers. An attacker who controls part of the browser could then write data to memory that has already been freed, potentially leading to code execution.

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.