Out of bounds write in GPU (CVE-2026-9906)
The GLES2 command decoder does not check whether a program is active for Transform Feedback before linking, so a compromised renderer can desynchronise Chrome's buffer size calculations from the native driver's state. This lets an attacker supply an undersized buffer that the driver may write past, potentially causing an out-of-bounds write in the GPU process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 56 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 GLES2 validating command decoder fails to verify if Transform Feedback is active during program linking. This allows a compromised renderer to desynchronize Chrome's internal size calculations from the native GPU driver's state. By bypassing buffer size validation, an attacker can supply undersized buffers to the native driver, potentially causing an out-of-bounds write in the GPU process.
Affected files:
gpu/command_buffer/service/gles2_cmd_decoder.ccgpu/command_buffer/service/program_manager.cc
Estimated timestamp from git blame: 2019-04-03
Vulnerability Description
The GLES2 validating command decoder (used on Android and certain desktop GL configurations) contains a state desynchronization vulnerability involving Transform Feedback (TF) and program linking.
According to the OpenGL ES 3.0 specification (§2.12.6), if glLinkProgram is called on a program object that is active for Transform Feedback, the link should fail, a GL_INVALID_OPERATION error should be generated, and the program's executable state should remain unchanged.
However, Chrome's command decoder (GLES2DecoderImpl::DoLinkProgram and Program::Link) does not check if the program is active for TF before passing the glLinkProgram call to the native driver. Furthermore, it blindly trusts glGetProgramiv(..., GL_LINK_STATUS, ...) to determine if the native link succeeded, without checking for GL errors. If a program was previously linked successfully, its GL_LINK_STATUS remains GL_TRUE even after a rejected link attempt. Chrome misinterprets this leftover GL_TRUE status as a successful re-link and updates its internal metadata to match the newly attached shaders, while the native driver retains the old shaders.
Potential Exploitation Steps
(Note: Our tooling cannot execute code yet, so these are suggested/potential steps an attacker would follow to trigger this vulnerability.)
- Initial Link: A compromised renderer creates a program (
P1), attaches a vertex shader outputting a very large varying (e.g., 64 bytes per vertex), and links it. Chrome correctly records the TF requirement as 64 bytes per vertex. - Start Transform Feedback: The attacker allocates a large buffer, binds it, calls
glUseProgram(P1), and begins Transform Feedback. - Pause Transform Feedback: The attacker calls
glPauseTransformFeedback(). - Malicious Reconfiguration: The attacker detaches the original vertex shader and attaches a new one with a very small varying (e.g., 4 bytes per vertex). They then call
glTransformFeedbackVaryingsfor the new small varying. - The Desynchronization: The attacker calls
glLinkProgram(P1).- The native driver correctly rejects the link because TF is active, generating an error and keeping the 64-byte shader active.
- Chrome queries
GL_LINK_STATUS. Because the driver didn't change the program state, the status remainsGL_TRUEfrom step 1. - Chrome assumes the link succeeded and updates its internal TF metadata to the new 4-byte size.
- Bypassing Validation: The attacker allocates a tiny 400-byte TF buffer, binds it, resumes TF, and issues a draw call for 100 vertices.
- OOB Write Trigger: Chrome validates the draw call using the corrupted 4-byte metadata (100 * 4 = 400 bytes), approving it. The native driver executes the draw using the actual 64-byte shader, attempting to write 6400 bytes into the 400-byte buffer.
While perfectly conformant drivers should natively clamp this write, many real-world mobile GPU drivers (e.g., Adreno, Mali) historically contain bounds-checking flaws and trust the application (Chrome) to size buffers correctly. This can result in a massive out-of-bounds write in the GPU process or kernel driver, leading to a potential sandbox escape.
Suggested Fix
Modify GLES2DecoderImpl::DoLinkProgram (in gpu/command_buffer/service/gles2_cmd_decoder.cc) to explicitly check if the program is active for Transform Feedback before proceeding. If it is active and not paused, or active and paused, the function should immediately generate a GL_INVALID_OPERATION and return early, preventing the state update.
if (state_.bound_transform_feedback.get() &&
state_.bound_transform_feedback->active()) {
// Must check if the program being linked is actually the active one
if (program == state_.current_program.get()) {
LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glLinkProgram",
"program is active for transform feedback");
return;
}
}
Alternatively, Program::Link should check glGetError() after calling glLinkProgram() natively, and fail the link operation if GL_INVALID_OPERATION was generated.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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 command decoder does not reject glLinkProgram when the program is active for Transform Feedback, and it trusts a stale GL_LINK_STATUS instead of checking for a GL error.
Impact
A compromised renderer could cause an out-of-bounds write in the GPU process or kernel driver, potentially leading to a sandbox escape, though conformant drivers should clamp the write.
What the attacker needed
Compromised renderer; mobile GPU driver with bounds-checking flaws
The fix
The decoder should check whether the program is active for Transform Feedback before linking and return GL_INVALID_OPERATION, or Program::Link should check glGetError after the native link.
How it was found
- Create and link a program with a large vertex shader output.
- Start Transform Feedback with a large buffer.
- Pause Transform Feedback.
- Attach a new vertex shader with a small output and set new varyings.
- Call glLinkProgram; the driver rejects it but Chrome sees a stale success status and updates its metadata.
- Bind a tiny buffer, resume Transform Feedback, and issue a draw call that Chrome approves using the wrong size.
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.
Chrome checks how much data a graphics program will write before letting it run. This report says Chrome can be tricked into thinking a program writes less than it really does, so it approves a buffer that is too small. A malicious program could then write past the end of that buffer, which is a memory safety bug.
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.