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

Heap buffer overflow GPU (CVE-2026-12010)

A state desynchronisation in the GLES2 command decoder's DoCopyTexImage2D leaves the decoder's texture metadata at the original larger size while the driver-side texture is redefined to a smaller size. A compromised renderer could then issue a sub-image write that passes validation against the stale metadata and causes an out-of-bounds heap write in the GPU process.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 15 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 potential state desynchronization vulnerability exists in the GLES2 validating command decoder's DoCopyTexImage2D implementation. When copying from a multisampled framebuffer, a native GL error during the sub-image copy prevents the decoder from updating its internal texture state, while the underlying driver-side texture is successfully redefined to a smaller size. This desynchronization can allow subsequent sub-image writes to bypass validation and trigger an out-of-bounds write in the GPU process.

Affected files:

  • gpu/command_buffer/service/gles2_cmd_decoder.cc
  • gpu/command_buffer/service/texture_manager.cc

Estimated timestamp from git blame: 2018-01-08

Description

A potential state desynchronization vulnerability has been identified in GLES2DecoderImpl::DoCopyTexImage2D within the GLES2 validating command decoder (gpu/command_buffer/service/gles2_cmd_decoder.cc).

When a client issues a glCopyTexImage2D command that requires coordinate clipping (such as when the requested copy coordinates or dimensions extend beyond the read framebuffer boundaries), the validating decoder enters a clipped execution branch. In this branch, it performs two native GPU driver calls:

  1. It first calls api()->glTexImage2DFn(...) to redefine the driver-side texture storage to the smaller, clipped dimensions.
  2. It then calls api()->glCopyTexSubImage2DFn(...) to copy the pixel region.

Under the OpenGL ES 3.0/3.1 specifications, calling glCopyTexSubImage2D is prohibited if the read framebuffer is multisampled (generating a GL_INVALID_OPERATION error). However, the preceding glTexImage2D allocation does not read from the framebuffer and thus succeeds without error. This results in a scenario where the driver-side texture has been resized to the smaller dimensions, but the subsequent copy operation fails.

At the end of DoCopyTexImage2D, the decoder checks for native GL errors via LOCAL_PEEK_GL_ERROR. Because the second call generated GL_INVALID_OPERATION, the error check fails (error != GL_NO_ERROR), causing the decoder to skip the call to texture_manager()->SetLevelInfo(...). Consequently, the decoder's internal LevelInfo metadata retains the texture's original, larger dimensions, while the underlying GPU driver's texture level has successfully been redefined to the smaller size.

This state desynchronization allows subsequent sub-image writes (via glTexSubImage2D) to bypass the validating decoder's bounds checks (which validate against the stale, larger LevelInfo metadata) and write past the actual, smaller driver-allocated texture bounds, resulting in an out-of-bounds heap write in the GPU process.

Note: Our tooling agent currently does not have the ability to run code or verify this with a live Proof of Concept (PoC). The vulnerability and steps below are based entirely on static code analysis of the active Chromium codebase.


Potential Steps to Reproduce / Exploit

An attacker in control of a compromised renderer process would potentially execute the following steps:

  1. Create and bind a multisampled framebuffer to GL_READ_FRAMEBUFFER (e.g., using glRenderbufferStorageMultisample).
  2. Create a texture and define its initial level 0 to have large dimensions (e.g., 1000x1000) using glTexImage2D. The validating decoder registers these dimensions in LevelInfo.
  3. Call glCopyTexImage2D targeting the newly created texture at level 0, specifying smaller dimensions (e.g., 100x100) and copy coordinates that extend outside the boundaries of the multisampled read framebuffer. This forces the decoder into the clipped fallback path.
  4. During DoCopyTexImage2D execution:
    • The native driver successfully processes glTexImage2D, resizing the actual texture storage to 100x100.
    • The native driver fails the subsequent glCopyTexSubImage2D with GL_INVALID_OPERATION due to the multisampled framebuffer.
    • The decoder detects the error and skips SetLevelInfo, leaving its internal metadata for the texture at 1000x1000.
  5. Issue a glTexSubImage2D command to write a 500x500 pixel payload to the texture.
  6. The validating decoder's TextureManager::ValidateTexSubImage checks the bounds (500x500) against the stale metadata (1000x1000) and allows the command to pass.
  7. The native GPU driver attempts to write the 500x500 payload into the 100x100 buffer, resulting in an out-of-bounds heap write in the GPU process.

Proposed Fix

To prevent this state desynchronization, the validating command decoder should explicitly validate that the read framebuffer is not multisampled before executing any driver-side modifications in DoCopyTexImage2D and DoCopyTexSubImage2D:

In gpu/command_buffer/service/gles2_cmd_decoder.cc:

C++
if (GetBoundFramebufferSamples(GL_READ_FRAMEBUFFER) > 0) {
  LOCAL_SET_GL_ERROR(
      GL_INVALID_OPERATION, func_name,
      "cannot copy from a multisampled framebuffer");
  return;
}

Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379


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

The decoder updates driver-side texture storage before a copy that can fail, and skips updating its own LevelInfo when that copy returns a GL error, leaving the two out of sync.

Impact

A compromised renderer could potentially trigger an out-of-bounds heap write in the GPU process; the report is based on static analysis and has not been verified with a live proof of concept.

What the attacker needed

Control of a compromised renderer process

The fix

The decoder should reject copy operations when the read framebuffer is multisampled before making any driver-side changes; the report proposes this but does not say it was applied.

How it was found

  1. Create and bind a multisampled framebuffer as the read framebuffer.
  2. Create a texture and define level 0 with large dimensions so the decoder records them.
  3. Call glCopyTexImage2D with smaller dimensions and copy coordinates outside the framebuffer, forcing the clipped path.
  4. The driver resizes the texture but the copy fails, so the decoder keeps the old larger metadata.
  5. Issue a glTexSubImage2D write larger than the real texture but smaller than the stale metadata.
  6. The write passes validation and overflows the driver-allocated texture in the GPU process.

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.

The browser's GPU process keeps its own record of how big each texture is, and it checks writes against that record before passing them to the graphics driver. Here a failed copy operation made the driver shrink the real texture while the browser's record stayed at the old, larger size. A later write that looked fine against the old record could then overflow the smaller real texture in 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.