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

Use after free in GPU (CVE-2026-8553)

A use-after-free write vulnerability exists in Chrome's GPU process when a mapped buffer triggers an out-of-memory error during glBufferData, leaving a dangling pointer. An attacker with a compromised renderer could exploit this to write controlled data into freed driver memory, potentially leading to remote code execution and sandbox escape on Android.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 42 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 security team.

Overview: A potential Use-After-Free (UAF) write vulnerability exists in the validating command decoder in the GPU process. When a mapped buffer triggers an out-of-memory error during glBufferData, the buffer is implicitly unmapped by the OpenGL driver, but Chrome fails to update its internal state. A subsequent unmap operation then copies attacker-controlled data into the dangling driver pointer, leading to memory corruption.

Affected files:

  • gpu/command_buffer/service/buffer_manager.cc
  • gpu/command_buffer/service/gles2_cmd_decoder.cc
  • gpu/command_buffer/service/buffer_manager.h

Estimated timestamp from git blame: 2025-11-28

Summary

A potential Use-After-Free (UAF) write vulnerability has been identified in the validating command decoder's buffer management logic, which is the default on Android.

The issue arises when glBufferData is called on a buffer that is currently mapped. According to the OpenGL ES 3.0 specification, this operation implicitly unmaps the buffer. However, if the glBufferData call fails with GL_OUT_OF_MEMORY, Chrome's error handling returns early and fails to clear its internal mapping state, leaving a dangling pointer that can later be written to by an attacker.

Technical Details

In gpu/command_buffer/service/buffer_manager.cc, the BufferManager::DoBufferData function handles the glBufferData command:

  1. It invokes the underlying GL API's glBufferData (e.g., at line 498).
  2. According to GLES 3.0 specs, calling glBufferData on a mapped buffer deletes the existing data store and implicitly unmaps the buffer. The memory previously pointed to by mapped_range_->pointer is freed by the GL driver.
  3. Chrome checks for errors using ERRORSTATE_PEEK_GL_ERROR (line 504).
  4. If a GL_OUT_OF_MEMORY error is detected, the function performs an early return (line 511).
  5. This early return bypasses the call to SetInfo (line 514). SetInfo eventually calls Buffer::SetInfo, which is responsible for executing mapped_range_.reset(nullptr); to clear the mapping state.

Because mapped_range_ is not cleared on OOM, Chrome continues to hold a dangling pointer to the memory address previously provided by the driver.

A subsequent call to glUnmapBuffer or glFlushMappedBufferRange will trigger GLES2DecoderImpl::UnmapBufferHelper (or DoFlushMappedBufferRange) in gpu/command_buffer/service/gles2_cmd_decoder.cc. This function retrieves the dangling mapped_range->pointer and executes a memcpy from renderer-controlled shared memory into that address (around line 16698):

C++
UNSAFE_TODO(memcpy(mapped_range->pointer, mem, mapped_range->size));

Impact and Reachability

Because the pointer in question is allocated by the external GPU driver and not by PartitionAlloc, MiraclePtr (BackupRefPtr) does not provide protection against this UAF, despite the DanglingUntriaged annotation.

This vulnerability provides a compromised renderer with a controlled memcpy primitive into the GPU process's memory space. By grooming the driver's memory allocator, an attacker can overwrite critical GPU process or driver data, potentially leading to Remote Code Execution (RCE) and a full sandbox escape on Android (where the GPU process is often unsandboxed).

Potential Reproduction Steps

Note: These are suggested steps; our tooling has not executed a working proof of concept to verify them.

  1. From a compromised renderer, initialize a GLES3 context on Android using the validating decoder.
  2. Bind a buffer and map it using glMapBufferRange with write access.
  3. Call glBufferData on the mapped buffer with a size large enough to trigger GL_OUT_OF_MEMORY in the driver (but below the 1GB limit enforced by Chrome's kDefaultMaxBufferSize).
  4. The OpenGL driver frees the mapped memory, but Chrome retains the pointer.
  5. Perform heap grooming by allocating new textures or buffers to reclaim the freed memory block.
  6. Call glUnmapBuffer for the implicitly unmapped buffer. Chrome will copy attacker-controlled data from shared memory into the newly allocated object.

Suggested Fix

In BufferManager::DoBufferData (gpu/command_buffer/service/buffer_manager.cc), ensure that SetInfo is called, or the buffer's mapping state is explicitly cleared, even if an error like GL_OUT_OF_MEMORY is returned. Alternatively, validate that the buffer is not mapped before proceeding with glBufferData, similar to the check performed in ValidateAndDoBufferSubData.

Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33


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. 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 early return on GL_OUT_OF_MEMORY in BufferManager::DoBufferData skips clearing the buffer's mapped state, leaving a dangling pointer.

Impact

A compromised renderer could gain a controlled memcpy primitive into the GPU process, potentially leading to remote code execution and a full sandbox escape on Android, where the GPU process is often unsandboxed.

What the attacker needed

Compromised renderer; Android platform; GLES3 context

The fix

The fix should ensure that SetInfo is called or the buffer's mapping state is explicitly cleared even on GL_OUT_OF_MEMORY, or validate that the buffer is not mapped before glBufferData.

How it was found

  1. From a compromised renderer, initialize a GLES3 context on Android using the validating decoder.
  2. Bind a buffer and map it using glMapBufferRange with write access.
  3. Call glBufferData on the mapped buffer with a size large enough to trigger GL_OUT_OF_MEMORY in the driver.
  4. The OpenGL driver frees the mapped memory, but Chrome retains the pointer.
  5. Perform heap grooming by allocating new textures or buffers to reclaim the freed memory block.
  6. Call glUnmapBuffer for the implicitly unmapped buffer; Chrome copies attacker-controlled data into the newly allocated object.

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.

When a program frees memory but keeps a pointer to it, that pointer becomes 'dangling' and using it can corrupt memory. Here, Chrome's GPU process fails to clear its record of a mapped buffer after an out-of-memory error, so later it writes attacker data into memory that the graphics driver has already freed. This could let an attacker who already controls the renderer process take over the GPU process and escape the sandbox on Android.

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.