Uninitialized Use in Dawn (CVE-2026-11067)
Dawn marks WebGPU queries as available during command encoding rather than submission, so an attacker can record queries on an encoder, discard it without submitting, and then resolve those queries using a second encoder. This bypasses the zero-initialisation safety check and causes uninitialised GPU memory to be copied into a mappable buffer, potentially leaking data from other processes.
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. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the security team.
Overview: Dawn tracks WebGPU QuerySet availability state during command encoding rather than submission. An attacker can record queries on an encoder, drop the encoder without submitting it, and then resolve the queries using a second encoder. This bypasses zero-initialization checks, resulting in a cross-origin read of uninitialized GPU memory.
Affected files:
third_party/dawn/src/dawn/native/d3d12/CommandBufferD3D12.cppthird_party/dawn/src/dawn/native/CommandEncoder.cppthird_party/dawn/src/dawn/native/QuerySet.cppthird_party/dawn/src/dawn/native/RenderPassEncoder.cppthird_party/dawn/src/dawn/native/d3d12/QuerySetD3D12.cppthird_party/dawn/src/dawn/native/QuerySet.h
Estimated timestamp from git blame: 2025-12-07
Background
In WebGPU, QuerySet objects store results from GPU measurements like occlusion or timestamps. These results must be resolved into a GPUBuffer before being mapped to the CPU. Dawn tracks which queries are "available" (i.e., have had a result written) to prevent resolving uninitialized data. If an unavailable query is resolved, Dawn is supposed to zero-clear the destination buffer to prevent leaking uninitialized GPU memory.
Vulnerability Description
Dawn suffers from a state desynchronization vulnerability because query availability is updated immediately during command encoding on the globally shared QuerySetBase object, rather than when the command buffer is successfully submitted and executed by the GPU.
In third_party/dawn/src/dawn/native/CommandEncoder.cpp (and related pass encoders), functions like TrackQueryAvailability immediately modify the QuerySetBase::mQueryAvailability vector:
// third_party/dawn/src/dawn/native/CommandEncoder.cpp
void CommandEncoder::TrackQueryAvailability(QuerySetBase* querySet, uint32_t queryIndex) {
// ...
// Set the query at queryIndex to available for resolving in query set.
querySet->SetQueryAvailability(queryIndex, true);
}
Because a CommandEncoder can be discarded without ever being submitted to the GPUQueue, the global QuerySet state can be permanently polluted. An attacker can record commands that mark queries as available, drop the encoder, and then issue a resolveQuerySet command via a new encoder.
During processing of the submitted resolve command in backends like D3D12 and Vulkan (e.g., CommandBufferD3D12.cpp:1299-1301), Dawn relies on this polluted state:
// third_party/dawn/src/dawn/native/d3d12/CommandBufferD3D12.cpp
auto startIt = querySet->GetQueryAvailability().begin() + firstQuery;
auto endIt = querySet->GetQueryAvailability().begin() + firstQuery + queryCount;
bool hasUnavailableQueries = std::find(startIt, endIt, false) != endIt;
if (hasUnavailableQueries || clearNeeded) {
DAWN_TRY(device->ClearBufferToZero(...));
}
Since the queries appear "available" to Dawn, hasUnavailableQueries evaluates to false. The safety ClearBufferToZero is bypassed. The GPU then copies uninitialized memory from the QueryHeap (which was never actually written to) into the destination buffer.
(Note: This issue might also be accompanied by a data race, as std::vector<bool> is modified concurrently without locking if multiple encoders record to the same QuerySet on different threads).
Potential Attack Steps
- Use WebGPU to create a
GPUQuerySet(e.g., occlusion, 1024 queries) and a mappable destinationGPUBuffer. - Create a "Phantom"
GPUCommandEncoder. Begin a render pass and callbeginOcclusionQuery(0)andendOcclusionQuery(). - Discard the Phantom encoder (do not call
finish()or submit it). The globalQuerySetnow falsely marks query 0 as available. - Create a "Resolving"
GPUCommandEncoder. CallresolveQuerySet(queryset, 0, 1, destinationBuffer, 0). finish()and submit the Resolving encoder to theGPUQueue.- Use
copyBufferToBufferandmapAsync(READ)to extract the contents ofdestinationBuffer. It will contain uninitialized GPU memory from the native query heap allocation, which may belong to other processes.
Recommended Fix
Query availability state should not be permanently committed to the QuerySetBase during command encoding.
- Track Per-Pass/Encoder:
CommandEncodershould track query availability changes locally in itsCommandBufferResourceUsagestate. - Commit on Submit: Only update the global
QuerySetBaseavailability state when the command buffer is successfully submitted to theGPUQueue(e.g., inQueue::Submit). - Thread Safety: Ensure that concurrent writes and reads to the
QuerySetstate during execution are properly synchronized or transitioned away fromstd::vector<bool>, which is inherently unsafe for concurrent element access.
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
Query availability is updated immediately on the shared QuerySet object during command encoding instead of being committed only when the command buffer is successfully submitted.
Impact
An attacker could read uninitialised GPU memory that may belong to other processes, resulting in a cross-origin information leak; the report also notes a possible data race when multiple encoders touch the same query set concurrently.
What the attacker needed
WebGPU support in the browser; Ability to run WebGPU commands
The fix
Query availability should be tracked locally per encoder and only committed to the shared query set when the command buffer is successfully submitted, with proper synchronisation for concurrent access.
How it was found
- Create a GPUQuerySet and a mappable destination GPUBuffer using WebGPU.
- Create a command encoder, begin a render pass, and record an occlusion query.
- Discard that encoder without finishing or submitting it, leaving the query marked as available.
- Create a second encoder and record a resolveQuerySet command for the same query.
- Finish and submit the second encoder to the GPUQueue.
- Copy the destination buffer to a mappable buffer and map it for reading to obtain uninitialised GPU memory.
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.
WebGPU is a browser API for running graphics and compute work on the GPU. A query set records measurements such as whether a drawing operation was visible. Normally, if you try to read a query that was never actually run, the browser clears the destination buffer to zero so you cannot see leftover GPU memory. This report shows that by preparing a query and then throwing away the command before it runs, you can trick the browser into thinking the query has a real result, so it skips the clearing step and copies old GPU memory into a buffer you can read.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.