Uninitialized Use in GPU (CVE-2026-9920)
The validating command decoder marks a destination texture as cleared before performing a copy operation. A compromised renderer can enable GL_RASTERIZER_DISCARD to silently abort the internal draw call, leaving the texture uninitialized but marked as safe, potentially leaking stale GPU memory from other origins.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 51 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: The validating command decoder preemptively marks destination textures as cleared before executing CopyTextureCHROMIUM operations. A compromised renderer can silently suppress the internal copy by enabling GL_RASTERIZER_DISCARD, leaving the texture uninitialized but marked as safe. This bypasses lazy-clearing mechanisms and potentially leaks stale, cross-origin GPU memory.
Affected files:
gpu/command_buffer/service/gles2_cmd_decoder.ccgpu/command_buffer/service/gles2_cmd_copy_texture_chromium.ccgpu/command_buffer/service/texture_manager.cc
Estimated timestamp from git blame: 2017-01-17
Summary
A potential vulnerability exists in the Chromium validating command decoder (used on Android and fallback environments) that could allow a compromised renderer to read uninitialized GPU memory. The issue occurs because the decoder commits the 'cleared' state of a destination texture before the actual copy operation completes. If the renderer manipulates GL state to silently abort the internal draw call, the destination texture remains uninitialized but is no longer protected by the decoder's lazy-clearing mechanism.
Note: The steps and exploitability described below are based on static code analysis. They are suggested/potential steps, as our tooling does not yet have the ability to run code and execute a live proof of concept.
Technical Details
In gpu/command_buffer/service/gles2_cmd_decoder.cc, both GLES2DecoderImpl::DoCopyTextureCHROMIUM and GLES2DecoderImpl::CopySubTextureHelper preemptively update the destination texture's cleared status (via SetLevelCleared or SetLevelClearedRect) before delegating the actual work to copy_texture_chromium_->DoCopyTexture.
When a draw-based copy is required (for instance, when the UNPACK_FLIP_Y_WEBGL pixel store parameter is true), the copy logic eventually reaches CopyTextureResourceManagerImpl::DoCopyTextureInternal. This function binds the destination to an internal framebuffer and issues a glDrawArrays call. While it carefully disables various GL states that might interfere with the copy (like GL_DEPTH_TEST, GL_BLEND, and GL_CULL_FACE), it fails to disable GL_RASTERIZER_DISCARD.
If the renderer previously enabled GL_RASTERIZER_DISCARD, the graphics driver will discard all primitives during the internal glDrawArrays call. No pixels are written to the uninitialized memory. However, because the TextureManager metadata was already updated, the texture is incorrectly treated as "cleared". Subsequent reads (e.g., via glReadPixels) will bypass TextureManager::ClearTextureLevel and return stale GPU memory, which may contain cross-origin compositor tiles or data from other processes.
Suggested Reproduction Steps
An attacker with a compromised renderer process could potentially trigger this by following these steps:
- Establish a WebGL or GLES2 context that utilizes the validating command decoder.
- Create a source texture and initialize it with arbitrary valid data to ensure it is marked as cleared.
- Create a destination texture and allocate it without initialization data (e.g.,
glTexImage2D(..., nullptr)). - Enable rasterizer discard via
glEnable(GL_RASTERIZER_DISCARD). - Issue a
glCopyTextureCHROMIUMcommand from the source to the destination, ensuring a draw-based path is used (e.g., by enablingGL_UNPACK_FLIP_Y_WEBGL).- Result: The decoder marks the destination as cleared, but the internal draw call is silently discarded. The texture memory remains uninitialized.
- Disable rasterizer discard via
glDisable(GL_RASTERIZER_DISCARD). - Read the destination texture contents via
glReadPixelsor shader sampling. Stale GPU memory is returned.
Proposed Fix
There are two main areas to address to fix this robustness issue:
- Disable
GL_RASTERIZER_DISCARDinternally: Ingpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc, updateCopyTextureResourceManagerImpl::DoCopyTextureInternalto explicitly callglDisable(GL_RASTERIZER_DISCARD)alongside the other state disables (around line 1410) prior to drawing. State restoration at the end of the function (decoder->RestoreGlobalState()) will correctly restore the renderer's preferred state. - Defer Cleared Status Update: In
gles2_cmd_decoder.cc, ideallySetLevelClearedshould only be called after the copy operation has successfully completed. This prevents other silent failure modes (such as an Out-of-Memory failure during intermediate texture allocation forDRAW_AND_COPYpaths) from improperly marking uninitialized memory as safe.
Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad
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.
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 decoder updates the texture's cleared status before the copy completes, and the copy routine fails to disable GL_RASTERIZER_DISCARD, allowing the draw call to be discarded.
Impact
A compromised renderer could potentially read stale GPU memory, which may contain cross-origin compositor tiles or data from other processes.
What the attacker needed
Compromised renderer process; WebGL or GLES2 context
The fix
The copy routine should explicitly disable GL_RASTERIZER_DISCARD before drawing, and the cleared status should be updated only after the copy succeeds.
How it was found
- Establish a WebGL or GLES2 context that uses the validating command decoder.
- Create and initialize a source texture with valid data.
- Create a destination texture without initialization data.
- Enable rasterizer discard.
- Issue a copy command that uses a draw-based path, such as by enabling flip-Y.
- Disable rasterizer discard and read the destination texture to obtain stale 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.
When a program copies an image, it first tells the system the destination is safe to use. But if the copy is silently skipped, the system still thinks the image is safe, and later reads return old data from other programs. This could let an attacker see memory they should not access.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.