Insufficient validation of untrusted input in GPU (CVE-2026-13875)
A compromised renderer could inject an invalid Windows NT handle as a DXGI fence, causing GetPendingWaitFences to fail and return an empty wait list. This bypasses GPU synchronisation during cross-device access, allowing WebGPU commands to run concurrently with initialisation and potentially expose uninitialised pooled GPU memory.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
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 compromised renderer can inject an invalid Windows NT handle as a DXGI fence, causing GetPendingWaitFences to fail and return an empty wait list. This bypasses GPU synchronization during cross-device access, allowing WebGPU commands to execute concurrently with initialization. This potential race condition can expose uninitialized, pooled GPU memory.
Affected files:
gpu/command_buffer/service/shared_image/d3d_image_backing.cc
Estimated timestamp from git blame: 2025-05-12
Vulnerability Details
In gpu/command_buffer/service/shared_image/d3d_image_backing.cc, the GetPendingWaitFences method is responsible for returning a list of fences that must be waited on before a SharedImage can be safely accessed on a different device (e.g., transitioning from D3D11 to Dawn/D3D12).
During a cross-device access, GetPendingWaitFences attempts a lazy initialization of a D3D11 fence (lines 1027-1048). As part of this, it iterates over all current write_fences_ and calls WaitD3D11 on each. If WaitD3D11 fails (for instance, because the fence wraps an invalid or non-D3D Windows NT handle), the function logs an error and returns an empty std::vector ({}) at line 1038.
The callers of this function, such as BeginAccessDawn, interpret an empty vector to mean that no synchronization is required. BeginAccessDawn passes fenceCount = 0 to Dawn, executing the GPU commands immediately. Furthermore, BeginAccessDawn subsequently calls BeginAccessCommon(write_access), which unconditionally clears both write_fences_ and read_fences_ (lines 1735-1736). This permanently discards legitimate synchronization primitives.
Potential Attack Steps
Note: These are suggested steps to trigger the vulnerability, as our automated tooling does not currently run or verify Proof of Concept code.
- Compromise Renderer: An attacker gains arbitrary code execution within the sandboxed renderer process.
- Create SharedImage: The renderer requests the creation of a
SharedImagewith usages that require cross-device synchronization (e.g.,SHARED_IMAGE_USAGE_WEBGPU_READ). This texture is backed by newly allocated or pooled D3D memory, which may contain sensitive cross-origin data. - Inject Invalid Fence: The renderer sends a
mojom::DeferredSharedImageRequest::Tag::kRegisterDxgiFenceIPC message to the GPU process. The attacker supplies an arbitrary, non-D3D Windows NT handle (e.g., a standard Event handle) wrapped as aGpuFenceHandle. - Update Fence:
SharedImageStub::OnRegisterDxgiFencewraps this handle without validating it's a D3D fence. The renderer then sends akUpdateDxgiFenceIPC, causing the invalid fence to be inserted into the backing'swrite_fences_set. - Trigger Cross-Device Access: The renderer initiates a WebGPU read access to the SharedImage (Dawn D3D12 backend). This calls
BeginAccessDawnin the GPU process. - Bypass Synchronization:
BeginAccessDawncallsGetPendingWaitFences. The function attempts to wait on the attacker's invalid fence viaWaitD3D11.OpenSharedFencefails on the invalid handle, causingGetPendingWaitFencesto return an empty vector. - Data Race and Info Leak: Dawn is instructed to proceed with 0 wait fences. The WebGPU read command executes on the GPU concurrently with, or before, the D3D11 clear command that was meant to zero-initialize the texture. The attacker reads the uninitialized, pooled GPU memory into an attacker-controlled buffer, resulting in a cross-origin information leak.
Suggested Fix
- Safe Failure Handling: Modify
GetPendingWaitFencesand its callers (likeBeginAccessDawnandBeginAccessD3D11) to treat synchronization failures as fatal for the access. IfGetPendingWaitFencesencounters an error, it should explicitly indicate a failure (e.g., returningstd::nulloptinstead of an empty vector), and the caller should abort the access (returningnullptrorfalse) instead of proceeding with no wait fences. - Input Validation: Add validation to
SharedImageStub::OnRegisterDxgiFenceorD3DSharedFence::CreateFromScopedHandleto ensure that handles passed over IPC from the renderer are actually valid D3D shared fences before they are accepted and stored.
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 code treats a failure to wait on a fence as 'no fences to wait for' instead of as an error, and it does not validate that handles received over IPC are genuine D3D fences.
Impact
A compromised renderer could read uninitialised pooled GPU memory into an attacker-controlled buffer, resulting in a cross-origin information leak.
What the attacker needed
Compromised renderer process; Windows with D3D11 and Dawn D3D12; ability to send IPC to the GPU process
The fix
The code should treat synchronisation failures as fatal for the access and validate that handles received over IPC are genuine D3D shared fences before accepting them.
How it was found
- Compromise the sandboxed renderer process to gain arbitrary code execution.
- Request creation of a SharedImage that requires cross-device synchronisation and is backed by pooled D3D memory.
- Send an IPC message registering an arbitrary non-D3D Windows NT handle as a DXGI fence.
- Send an update IPC so the invalid fence is inserted into the backing's write_fences_ set.
- Initiate a WebGPU read access to the SharedImage, triggering BeginAccessDawn in the GPU process.
- GetPendingWaitFences fails on the invalid handle and returns an empty vector, so Dawn proceeds with zero wait fences and the read races with initialisation.
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 renderer process is the part of a browser that draws web pages and is kept in a sandbox so that if it is compromised, damage is limited. Here, the renderer can send a fake fence (a signal used to make the GPU wait) to the GPU process. When the GPU process cannot understand the fake fence, it wrongly assumes no waiting is needed, so a read command may run before memory is cleared and could see leftover data from other websites.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.