Uninitialized Use in WebGL (CVE-2026-9917)
The validating command decoder fails to disable GL_RASTERIZER_DISCARD before performing lazy clears on uninitialized framebuffer attachments, so drivers ignore the clear commands while Chrome marks the buffers as cleared. A subsequent glReadPixels call can then leak uninitialized GPU VRAM to web content.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 52 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 fails to disable GL_RASTERIZER_DISCARD before performing lazy clears on uninitialized framebuffer attachments. Because underlying drivers (like ANGLE) ignore clear commands when rasterizer discard is active, the buffers remain uninitialized but are erroneously marked as cleared. A subsequent glReadPixels call can then leak this uninitialized GPU VRAM to web content.
Affected files:
gpu/command_buffer/service/gles2_cmd_decoder.ccgpu/command_buffer/service/framebuffer_manager.cc
Estimated timestamp from git blame: 2017-11-03
Description
In Chrome's validating command decoder, uninitialized framebuffer attachments (such as renderbuffers) are lazily cleared to zero before their first use. This prevents leaking sensitive GPU memory to web content. The setup for these clear operations is handled by GLES2DecoderImpl::ClearUnclearedAttachments.
While this function correctly temporarily disables states that could interfere with clearing (such as GL_SCISSOR_TEST), it fails to disable GL_RASTERIZER_DISCARD.
When GL_RASTERIZER_DISCARD is enabled, underlying drivers (such as ANGLE) will silently ignore glClear and glClearBuffer* commands. For instance, ANGLE's Context::noopClearBuffer returns early if rasterizer discard is active.
If an attacker triggers a lazy clear while GL_RASTERIZER_DISCARD is enabled, Chrome will issue the clear commands (e.g., glClearBufferuiv via Framebuffer::ClearUnclearedIntRenderbufferAttachments), which the driver immediately drops. Chrome then unconditionally updates its internal tracking, marking the attachment as initialized via SetCleared(..., true).
Because glReadPixels is not a rasterization command, it is unaffected by GL_RASTERIZER_DISCARD. A subsequent read operation will successfully execute, extracting the uninitialized GPU VRAM and returning it to the sandboxed renderer process.
Potential Reproduction Steps
Note: These are suggested steps based on static code analysis; we do not yet have a working proof of concept that has been successfully run.
- On a platform using the validating command decoder (e.g., Chrome for Android), create a WebGL 2 context.
- Allocate an integer renderbuffer (e.g.,
gl.RGBA8UI) and attach it to a newly created framebuffer'sgl.COLOR_ATTACHMENT0. - Enable rasterizer discard by calling
gl.enable(gl.RASTERIZER_DISCARD). - Trigger a readback operation that forces a lazy clear, such as
gl.readPixels(...)usinggl.RGBA_INTEGERandgl.UNSIGNED_INT. - The returned TypedArray will contain uninitialized GPU VRAM (potentially cross-origin data or other processes' memory) instead of the expected zeros.
Suggested Fix
Modify GLES2DecoderImpl::ClearUnclearedAttachments in gpu/command_buffer/service/gles2_cmd_decoder.cc to temporarily disable GL_RASTERIZER_DISCARD before issuing any clear commands, similar to how it currently handles GL_SCISSOR_TEST. Additionally, ensure that GL_RASTERIZER_DISCARD is properly restored to its previous state at the end of the function (e.g., by updating GLES2DecoderImpl::RestoreClearState()).
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 clear routine temporarily disables some interfering states but not GL_RASTERIZER_DISCARD, so the driver drops the clear commands while Chrome still marks the attachment as cleared.
Impact
A web page could read uninitialized GPU memory, potentially including cross-origin data or other processes' memory, though the report notes no working proof of concept has been run.
What the attacker needed
WebGL 2 support; platform using validating command decoder
The fix
The clear routine should temporarily disable GL_RASTERIZER_DISCARD before issuing clear commands and restore its previous state afterwards.
How it was found
- Create a WebGL 2 context on a platform using the validating command decoder.
- Allocate an integer renderbuffer and attach it to a new framebuffer's colour attachment.
- Enable rasterizer discard.
- Trigger a readback that forces a lazy clear, such as reading pixels with integer formats.
- Observe that the returned data contains uninitialized GPU memory instead of zeros.
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 web page uses WebGL to draw graphics, the browser sometimes needs to clear a chunk of graphics memory before first use to avoid leaking old data. This report says a setting called rasterizer discard can make the graphics driver skip that clearing step, but the browser still thinks the memory is clean. A malicious page could then read back the uncleared memory and see whatever was left there.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.