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
- 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.ccgpu/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:
- It first calls
api()->glTexImage2DFn(...)to redefine the driver-side texture storage to the smaller, clipped dimensions. - 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:
- Create and bind a multisampled framebuffer to
GL_READ_FRAMEBUFFER(e.g., usingglRenderbufferStorageMultisample). - Create a texture and define its initial level 0 to have large dimensions (e.g., 1000x1000) using
glTexImage2D. The validating decoder registers these dimensions inLevelInfo. - Call
glCopyTexImage2Dtargeting 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. - During
DoCopyTexImage2Dexecution:- The native driver successfully processes
glTexImage2D, resizing the actual texture storage to 100x100. - The native driver fails the subsequent
glCopyTexSubImage2DwithGL_INVALID_OPERATIONdue to the multisampled framebuffer. - The decoder detects the error and skips
SetLevelInfo, leaving its internal metadata for the texture at 1000x1000.
- The native driver successfully processes
- Issue a
glTexSubImage2Dcommand to write a 500x500 pixel payload to the texture. - The validating decoder's
TextureManager::ValidateTexSubImagechecks the bounds (500x500) against the stale metadata (1000x1000) and allows the command to pass. - 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:
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.
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
- Create and bind a multisampled framebuffer as the read framebuffer.
- Create a texture and define level 0 with large dimensions so the decoder records them.
- Call glCopyTexImage2D with smaller dimensions and copy coordinates outside the framebuffer, forcing the clipped path.
- The driver resizes the texture but the copy fails, so the decoder keeps the old larger metadata.
- Issue a glTexSubImage2D write larger than the real texture but smaller than the stale metadata.
- 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.