Use after free in GPU (CVE-2026-11082)
A data race in the GPU process's lazy initialisation of a shader prefix string allows two threads to modify the same std::string without synchronisation, causing heap corruption such as use-after-free or double-free. An attacker with a compromised renderer could theoretically trigger this race and potentially achieve remote code execution and sandbox escape.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 58 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: A potential data race exists in GpuServiceImpl::GetShaderPrefixKey during the lazy initialization of the shader_prefix_key_ string. The GPU Main thread and the DrDc thread can concurrently modify this string without synchronization. This can lead to severe heap corruption, such as Use-After-Free or Double-Free, in the privileged GPU process.
Affected files:
components/viz/service/gl/gpu_service_impl.cccomponents/viz/service/gl/gpu_service_impl.h
Estimated timestamp from git blame: 2025-08-11
Vulnerability Details
A potential data race and memory corruption vulnerability exists in components/viz/service/gl/gpu_service_impl.cc. The function GpuServiceImpl::GetShaderPrefixKey() lazily initializes a class member std::string shader_prefix_key_ if it is empty. This initialization uses standard string assignment (operator=) and concatenation (operator+=) without any synchronization primitives (like a base::Lock).
Concurrent execution can occur from two different threads:
- GPU Main Thread: When the GPU process starts, the browser process reads cached shaders from disk and sends
LoadedBlobIPCs. These are routed toGpuServiceImpl::LoadedBlob, which executes on the GPU Main Thread and callsGetShaderPrefixKey(). - DrDc Thread (CompositorGpuThread): On Android, the Direct Rendering Display Compositor (DrDc) feature offloads Skia compositing to a dedicated thread. If Skia compiles a new shader, it calls
GrShaderCache::storesynchronously on the DrDc thread. This calls intoGpuServiceImpl::StoreBlobToDisk, which also callsGetShaderPrefixKey().
Because GrShaderCache::store holds a local lock but GpuServiceImpl::LoadedBlob does not acquire it before calling GetShaderPrefixKey(), both threads can race to initialize shader_prefix_key_. The generated prefix string is relatively large (150-300 bytes), meaning it exceeds libc++'s Small String Optimization (SSO) limit and forces a heap allocation. Concurrent assignments will corrupt the std::string internal pointers, leading to a Double-Free or Use-After-Free (UAF) of the GPU process heap. Note that std::string internal buffers are not protected by MiraclePtr.
Potential Attacker Steps
Note: These are suggested/potential steps based on code analysis, as our tooling agent does not have the ability to run code to produce a working proof-of-concept.
To exploit this vulnerability, an attacker with a compromised renderer process could theoretically follow these steps:
- Intentionally crash the GPU process (e.g., via a WebGL out-of-memory or known DoS bug) to force the browser to spawn a fresh GPU process.
- Upon restart, the browser process automatically begins loading previously cached shaders from disk and sending a burst of
LoadedBlobIPCs. The GPU Main Thread processes these and begins executingGpuServiceImpl::GetShaderPrefixKey(). - Concurrently, the attacker submits a crafted
CompositorFramefrom the renderer containing unique graphical effects (e.g., specific CSS filters) that force Skia to compile a new shader program on theCompositorGpuThread. - Both threads concurrently observe an empty
shader_prefix_key_and race to assign to it, triggering the UAF/Double-Free. - By carefully shaping the GPU heap prior to the race, the attacker could reallocate the freed string buffer with a controlled object, overwriting vtables or function pointers to achieve Remote Code Execution (RCE) and a full sandbox escape.
Suggested Fix
There are two primary ways to fix this potential issue:
- Eager Initialization: Initialize
shader_prefix_key_once on the main thread duringGpuServiceImpl::Initialize()or the class constructor, instead of using lazy initialization. This is the safest approach if the necessary system information is available at startup. - Locking: Introduce a
base::LockinsideGetShaderPrefixKey()to protect the lazy initialization block, ensuring that only one thread can assign toshader_prefix_key_.
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 lazy initialisation of a shared std::string member is performed without any lock, so two threads can concurrently assign to it and corrupt its internal heap buffer.
Impact
An attacker with a compromised renderer could theoretically cause heap corruption in the privileged GPU process and potentially achieve remote code execution and a full sandbox escape, though the report notes this is based on code analysis without a working proof-of-concept.
What the attacker needed
Compromised renderer process; ability to crash the GPU process; ability to submit crafted compositor frames
The fix
The report suggests either eagerly initialising the string once on the main thread during startup or protecting the lazy initialisation with a lock; it does not state that a fix was applied.
How it was found
- Crash the GPU process to force a fresh one to start.
- On restart, the browser sends cached shader blobs to the GPU main thread, which calls the vulnerable function.
- Concurrently, submit a crafted compositor frame that forces Skia to compile a new shader on the DrDc thread, which also calls the vulnerable function.
- Both threads race to initialise the shared string, triggering heap corruption.
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.
Two parts of the browser's graphics process can try to set up the same piece of text at the same time without waiting for each other. This can corrupt memory, which might let an attacker who already controls a web page take over the graphics process and escape the browser's security sandbox.
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.