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

Out of bounds write in GPU (CVE-2026-10897)

An incorrect GL target enum passed to glTexParameteri in a workaround path of DoCopyTexImage2D causes the driver to reject the call, so the decoder skips updating its tracked texture level size while the driver has already resized the allocation. An attacker could then submit a later texture upload that passes stale bounds checks and writes out of bounds in the GPU process.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 19 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: An incorrect GL target enum used in a workaround path in DoCopyTexImage2D causes a state desynchronization between the GLES2 validating command decoder and the GPU driver. This desynchronization allows attackers to bypass bounds checks, potentially leading to an out-of-bounds write in the GPU process.

Affected files:

  • gpu/command_buffer/service/gles2_cmd_decoder.cc

Estimated timestamp from git blame: 2018-01-08

Summary

A potential state desynchronization vulnerability exists in the GLES2 validating command decoder's implementation of DoCopyTexImage2D in gpu/command_buffer/service/gles2_cmd_decoder.cc. When performing a copy operation that triggers a feedback loop workaround (specifically when copying to a cube-map face while a different level of the same texture is attached to the read framebuffer), the decoder incorrectly passes a cube-face target enum to glTexParameteri. This results in a GL_INVALID_ENUM error from the driver, which causes the decoder to skip updating its internal state for that texture level. Subsequent operations can then bypass the decoder's validation, potentially leading to out-of-bounds writes in the GPU process.

Root Cause Analysis

In GLES2DecoderImpl::DoCopyTexImage2D, there is a workaround for cases where the read framebuffer's attachment is the same texture as the destination, but at a different level. To avoid mipmap incompleteness during the copy, the code attempts to temporarily clamp GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL to the attached level.

However, the code incorrectly uses the target parameter (which, for cube maps, is a specific face enum like GL_TEXTURE_CUBE_MAP_POSITIVE_X) in the calls to api()->glTexParameteriFn (lines 13586 and 13588). According to the GLES specification, glTexParameteri accepts base targets like GL_TEXTURE_CUBE_MAP, but not individual cube-face targets. This mismatch causes the driver to generate a GL_INVALID_ENUM error.

Following the GL calls, the decoder uses LOCAL_PEEK_GL_ERROR (line 13672) to check for errors. Because the previous glTexParameteri call generated an error, the decoder skips calling texture_manager()->SetLevelInfo (line 13674). While the internal state update is skipped, the driver-side texture dimensions have already been updated by the preceding glCopyTexImage2D call. This leads to a state desynchronization: the decoder's tracked LevelInfo for the texture level retains its previous size, while the actual allocation in the driver has been redefined with new dimensions.

Impact

The validating decoder enforces security invariants by maintaining an accurate model of GL state. When LevelInfo becomes stale, bounds checking for subsequent commands like glTexSubImage2D is compromised. An attacker could shrink a texture allocation on the driver side while the decoder still believes it is large, allowing a subsequent glTexSubImage2D to perform an out-of-bounds write in the GPU process.

This is potentially web-reachable via WebGL2 on configurations using the validating decoder (common on some Android devices). On Android, the GPU process is often unsandboxed, making this a high-impact vulnerability.

Potential Reproduction Steps

Note: These steps are based on code analysis and have not been executed.

  1. Initialize a cube map texture and define a large level (e.g., 512x512) for GL_TEXTURE_CUBE_MAP_POSITIVE_X at level 5.
  2. Define a smaller level (e.g., 64x64) for another face of the same texture (e.g., GL_TEXTURE_CUBE_MAP_POSITIVE_Y) at level 3.
  3. Attach the level 3 face to the READ_FRAMEBUFFER.
  4. Call gl.copyTexImage2D targeting the level 5 face. This triggers the workaround and the invalid glTexParameteri call.
  5. The decoder skips SetLevelInfo due to the error, but the driver redefines the level 5 allocation to 64x64.
  6. Execute gl.texSubImage2D on the level 5 face with 512x512 data. The decoder validates against the stale 512x512 dimensions and forwards the out-of-bounds write to the driver.

Recommended Fix

In gpu/command_buffer/service/gles2_cmd_decoder.cc, the workaround path in DoCopyTexImage2D should use the base texture target instead of the face target for glTexParameteri calls. Replace target with texture->target() in the calls at lines 13586, 13588, 13667, and 13669.

Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e


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 workaround passed a cube-face target to glTexParameteri, which only accepts base targets, so the driver raised an invalid-enum error and the decoder skipped its own state update while the driver had already resized the texture.

Impact

This could allow an out-of-bounds write in the GPU process, and on Android where the GPU process is often unsandboxed this may be high impact; the report notes the steps were not executed.

What the attacker needed

WebGL2 with the validating decoder; configuration common on some Android devices; no executed exploit shown

The fix

The workaround should pass the base texture target rather than the face target to the parameter calls.

How it was found

  1. Create a cube map texture with a large level on one face and a smaller level on another face.
  2. Attach the smaller face to the read framebuffer.
  3. Copy into the larger face, which triggers the workaround and the invalid parameter call.
  4. The decoder skips its state update while the driver resizes the destination level.
  5. Upload data sized for the old, larger dimensions to the resized level, producing an out-of-bounds write.

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.

A browser splits graphics work into a separate GPU process, and a checker in front of the graphics driver keeps its own record of how big each texture is so it can reject bad requests. Here the checker's record went stale after a driver call failed, so a later request looked safe when it was not and could write past the end of a texture buffer. The report is based on reading the code, not on running an exploit.

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.