Use after free in GPU (CVE-2026-15900)
A logic error in the validating GLES2 command decoder lets a buffer's transform feedback binding count drop to zero while a paused transform feedback object still references it. An attacker could then reallocate that buffer, so the GPU driver later writes into freed memory, causing a use-after-free that may allow a sandbox escape on unsandboxed GPU processes.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 33 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 logic error in the GLES2 validating command decoder allows a buffer's Transform Feedback binding count to be incorrectly decremented while it remains in use by a paused Transform Feedback object. This bypasses validation checks and permits glBufferData to reallocate the buffer while it is still actively referenced by the GPU driver, potentially resulting in a Use-After-Free (UAF) sandbox escape on unsandboxed GPU processes.
Affected files:
gpu/command_buffer/service/buffer_manager.ccgpu/command_buffer/service/indexed_buffer_binding_host.ccgpu/command_buffer/service/gles2_cmd_decoder.ccgpu/command_buffer/service/transform_feedback_manager.ccgpu/command_buffer/service/service_utils.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
A vulnerability in the non-passthrough (validating) GLES2 command decoder allows an attacker to bypass protections that prevent the modification of buffers currently in use by a Transform Feedback (TF) session. By exploiting a state-tracking desynchronization, an attacker can trigger a glBufferData or glBufferSubData call on a buffer attached to a paused but active TF object.
This bypasses the double-binding protection buffer->IsBoundForTransformFeedbackAndOther(). If glBufferData is called, the underlying GPU driver may reallocate the buffer's data store while it is still referenced. When the TF session is resumed, the GPU driver will write to the freed memory, leading to a Use-After-Free (UAF) or memory corruption in the GPU driver. On Android, where the GPU process is often unsandboxed, this can lead to a sandbox escape.
Root Cause Analysis
The vulnerability is caused by a failure in the validating command decoder's state tracking logic when switching between Transform Feedback objects:
- Incorrect Reference Count Decrement: When a new TF object is bound via
glBindTransformFeedback, the previous object is unbound.TransformFeedback::DoBindTransformFeedbackcallsSetIsBound(false)on the old object.IndexedBufferBindingHost::SetIsBound(false)iterates over the bound buffers and callsOnUnbind(GL_TRANSFORM_FEEDBACK_BUFFER, true). - State Desynchronization:
Buffer::OnUnbindblindly decrements thetransform_feedback_indexed_binding_count_. However, the old TF object may still be technically 'active' (though paused). The decoder's reference count no longer reflects that the buffer is still in use by the GL driver. - Validation Bypass: Because the reference count is
0, theBuffer::IsBoundForTransformFeedbackAndOther()check inBufferManager::ValidateAndDoBufferDataincorrectly returns false, allowing operations that modify or reallocate the buffer's storage (likeglBufferData) when it is simultaneously bound to another target (e.g.,GL_ARRAY_BUFFER).
Potential Attack Vector
These are suggested steps an attacker could follow to trigger the vulnerability. Our tooling agent does not have the ability to run code, so this is based on static analysis:
- Create a WebGL context on a device utilizing the non-passthrough validating GLES2 decoder.
- Generate a buffer
Band two transform feedback objects,TF1andTF2. - Bind
TF1as active:glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, TF1). - Bind buffer
BtoTF1's indexed target:glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, B). (Count goes to 1). - Activate and immediately pause
TF1:glBeginTransformFeedback(...)thenglPauseTransformFeedback(). - Bind
TF2:glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, TF2).TF1's buffers are "unbound" from the context state tracking.B'stransform_feedback_indexed_binding_count_drops to 0.TF1is still active and paused in the GL driver.
- Bind buffer
Bto a non-TF target:glBindBuffer(GL_ARRAY_BUFFER, B). (Double-binding check will now pass). - Call
glBufferData(GL_ARRAY_BUFFER, new_size, data, usage).- Validation passes because the currently bound TF (
TF2) is inactive, andB's TF binding count is 0. - The GPU driver reallocates the backing store for
B, freeing the old memory.
- Validation passes because the currently bound TF (
- Bind
TF1back:glBindTransformFeedback(GL_TRANSFORM_FEEDBACK, TF1). - Resume
TF1:glResumeTransformFeedback()and issue a draw call. - The GPU driver writes transform feedback outputs into the previously freed backing store, causing a UAF.
Suggested Fix
Modify IndexedBufferBindingHost::SetIsBound or Buffer::OnUnbind to account for the active and paused state of the Transform Feedback object. The transform_feedback_indexed_binding_count_ should only be decremented if the buffer is truly no longer in use by an active TF session, rather than just when the TF object is unbound from the context.
Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb
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
Likely, unbinding a transform feedback object decrements the buffer's binding count even though the object is still active and paused, so the decoder's state no longer matches the driver's and the double-binding validation passes.
Impact
The GPU driver could write into freed memory, causing a use-after-free or memory corruption, and on Android where the GPU process is often unsandboxed this could lead to a sandbox escape; the report is based on static analysis only and was not run.
What the attacker needed
Ability to run WebGL content; validating GLES2 decoder in use; unsandboxed GPU process for escape
The fix
The binding count should only be decremented when the buffer is genuinely no longer used by an active transform feedback session, taking the active and paused state into account.
How it was found
- Create a WebGL context that uses the validating GLES2 decoder.
- Create one buffer and two transform feedback objects.
- Bind the first object and attach the buffer to its indexed target.
- Begin transform feedback and then pause it.
- Bind the second object so the buffer's binding count drops to zero.
- Bind the buffer to another target, reallocate it, then rebind and resume the first object and draw.
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.
WebGL lets web pages draw with the graphics card through a set of commands. The browser checks these commands before passing them on, and one check is meant to stop a page changing a memory buffer while the graphics card is still writing results into it. Here that check can be fooled by pausing one recording session and switching to another, so the buffer gets replaced while still in use and the graphics card ends up writing into memory that has been handed back.
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.