Use after free in Media (CVE-2026-11028)
A race condition in the OOP video decoder service allows a dangling pointer to remain registered as a GPU channel loss observer, leading to a use-after-free when the observer is later notified. An attacker with renderer code execution could potentially exploit this to achieve remote code execution in the utility process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A Time-of-Check to Time-of-Use (TOCTOU) race condition exists between the utility main thread and the IO thread during GPU channel disconnection. This allows OOPVideoDecoderFactoryProcessService to be destroyed without unregistering itself as an observer, leaving a dangling raw pointer. Subsequent observer notification on the IO thread results in a Use-After-Free.
Affected files:
media/mojo/services/oop_video_decoder_factory_process_service.ccgpu/ipc/client/gpu_channel_host.ccgpu/ipc/client/gpu_channel_observer.h
Estimated timestamp from git blame: 2025-11-06
Technical Details
A cross-thread Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the OOPVideoDecoderFactoryProcessService (typically used on Linux and ChromeOS when USE_LINUX_VIDEO_ACCELERATION is enabled). The service implements the gpu::GpuChannelLostObserver interface and registers itself to be notified of GPU channel loss using a raw pointer (this).
The vulnerability is located in the service's destructor, which incorrectly uses a lock-free check to decide whether to unregister itself as an observer:
OOPVideoDecoderFactoryProcessService::~OOPVideoDecoderFactoryProcessService() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// TOCTOU Vulnerability: Lock-free atomic read of connection state.
if (shared_image_interface_ && !shared_image_interface_->IsLost()) {
shared_image_interface_->RemoveGpuChannelLostObserver(this);
}
}
The IsLost() check performs a lock-free atomic load of the channel's connection state (is_connected_) from the GpuChannelHost. Simultaneously, when the GPU process is disconnected, GpuChannelHost::ConnectionTracker::OnDisconnectedFromGpuProcess() is executed on the utility process's IO thread. This method sets the atomic connection state to false and then calls NotifyGpuChannelLost():
void GpuChannelHost::ConnectionTracker::OnDisconnectedFromGpuProcess() {
is_connected_.store(false); // Atomic store
// RACE WINDOW
NotifyGpuChannelLost(); // Acquires lock and iterates observer_list_
}
Potential Attack Steps
While we do not currently have a weaponized Proof of Concept, an attacker could potentially exploit this via the following sequence:
- Compromise Renderer: Gain initial code execution in a sandboxed renderer process.
- Trigger GPU Crash: Induce a GPU process crash or channel disconnection from the compromised renderer.
- Trigger Service Destruction: Simultaneously close the video stream/Mojo pipe connecting to the OOP Video Decoder utility process.
- Win the Race: The IO thread in the utility process executes
is_connected_.store(false)but is preempted before callingNotifyGpuChannelLost(). - Bypass Unregistration: The utility main thread executes
~OOPVideoDecoderFactoryProcessService(). SeeingIsLost() == true, it skips observer removal and frees the object memory. - UAF Execution: The IO thread resumes, iterates over the
observer_list_containing the dangling raw pointer, and callsobserver->OnGpuChannelLost(). Since this is a virtual method call, a heap-groomed utility process could allow the attacker to hijack the vtable and achieve Remote Code Execution (RCE) within the utility process sandbox.
Suggested Fix
The root cause is relying on a lock-free state check to bypass cleanup of a raw pointer in a multi-threaded observer list.
- Safe Observer Pattern: Migrate
observer_list_inGpuChannelHost::ConnectionTrackerto usebase::CheckedObserverorbase::WeakPtr<GpuChannelLostObserver>. This ensures dangling pointers safely nullify or crash deterministically. - Unconditional Removal: Alternatively, refactor the locking mechanism in
GpuChannelHostto allowRemoveGpuChannelLostObserverto be called unconditionally in the destructor without risking deadlocks, ensuring the pointer is properly purged before the memory is freed.
Evaluated with Chrome root at commit: 876d480da1f794d87813cfa2e6ff4fcf9771e939
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
The destructor uses a lock-free check of the channel's lost state to decide whether to unregister as an observer, creating a race where the object is freed before the observer list is notified.
Impact
An attacker could potentially achieve remote code execution within the utility process sandbox, though no weaponised proof of concept currently exists.
What the attacker needed
Code execution in a sandboxed renderer; ability to trigger GPU crash; win a race condition
The fix
The observer list should use checked or weak observers, or the destructor should unconditionally remove the observer under a safe locking mechanism.
How it was found
- Gain code execution in a sandboxed renderer process.
- Trigger a GPU process crash or channel disconnection from the renderer.
- Simultaneously close the video stream or Mojo pipe to the OOP video decoder utility process.
- Win the race so the IO thread sets the connection state to false but is preempted before notifying observers.
- The utility main thread destroys the service, sees the channel as lost, and skips observer removal, freeing the object.
- The IO thread resumes and calls the dangling observer, potentially hijacking the vtable for code execution.
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 use-after-free happens when a program frees memory but keeps using it, like deleting a file and then opening it. Here, a background service can be destroyed while still registered to receive notifications, so when a notification arrives it calls into freed memory. An attacker who already controls a web page's renderer process might turn this into code execution in a more privileged process.
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.