Use after free in Dawn (CVE-2025-10500)
A heap-use-after-free in the Dawn D3D12 backend of Chromium/WebGPU occurs when the resource allocator frees heap objects that are still referenced by in-flight GPU commands. An attacker could trigger a GPU process crash by performing specific WebGPU operations, potentially leading to further exploitation.
- Fix shipped in 46 days
Steps to reproduce the problem
Steps to reproduce
- Run open_PoC.bat (launches a local HTTP server and opens chromium)
- Navigates to PoC.html, The flag —no-sandbox is used for ASAN output. ⇒
./chrome.exe --no-sandbox http://localhost:8000/PoC.html - After a few reload cycles, the GPU process crashes. On ASan builds, you will see a heap-use-after-free
open_PoC.bat
@echo off
cd /d %~dp0
start "" python -m http.server 8000
timeout /t 2 >nul
start "" http://localhost:8000/PoC.html
Problem Description
Description
This issue is a heap-use-after-free bug in the Dawn D3D12 backend of Chromium/WebGPU, observed only on Windows systems without a discrete GPU (e.g., integrated GPU or GPU-less notebook environments), triggered by resource lifetime mismanagement during asynchronous GPU command execution.
Impact
When specific WebGPU operations are performed (creating large depth/stencil textures, creating incompatible texture views, and issuing copyTextureToBuffer with intentionally misaligned parameters), the GPU process consistently crashes.
Root Cause
The root cause lies in third_party/dawn/src/dawn/native/d3d12/ResourceAllocatorManagerD3D12.cpp:
void ResourceAllocatorManager::Tick(ExecutionSerial completedSerial) {
for (ResourceHeapAllocation& allocation :
mAllocationsToDelete.IterateUpTo(completedSerial)) {
if (allocation.GetInfo().mMethod == AllocationMethod::kSubAllocated) {
FreeSubAllocatedMemory(allocation);
}
}
mAllocationsToDelete.ClearUpTo(completedSerial);
mHeapsToDelete.ClearUpTo(completedSerial);
}
Tick() is called with a completedSerial that Dawn believes corresponds to all finished GPU work. However, in certain timing conditions, commands that still reference these Heap objects may not yet be fully retired on the GPU. This allows the manager to clear and free heap resources prematurely.
Later, when ResidencyManager::EnsureHeapsAreResident() iterates over those heap pointers to lock residency before executing a new command list, it dereferences stale pointers to already-freed memory. This results in a reproducible use-after-free read (and potentially write) condition.
mitigation suggestion
Use-after-free can be mitigated by introducing a reference counting mechanism for D3D12 Heaps:
retain the Heap while any command list or resource still references it, and only free when the ref-count drops to zero after GPU work completion.
How to Fix
The root cause is that ResourceAllocatorManager::Tick() may free ResourceHeapAllocation objects that are still referenced by in-flight GPU commands.
To fix this, introdue reference counting (or strong ownership tracking) for heap allocations instead of relying solely on completedSerial.
Key steps:
- Add a ref-count to ResourceHeapAllocation / Heap objects
- Increment the ref-count when a command list or texture/buffer references a heap.
- Decrement the ref-count only after the GPU has signaled completion of the work using that heap.
- Modify Tick() to defer freeing
-
In
Tick(), instead of callingFreeSubAllocatedMemory()andClearUpTo()immediately,check whether the ref-count for each
allocationhas reached 0. -
Only free and clear entries when no active references remain.
-
- Validation
- Optionally add debug assertions (in ASan/Debug builds) to ensure that no heap is accessed after free.
- This prevents use-after-free bugs when commands complete later than
completedSerialsuggests.
Pseudo-code adjustment:
void ResourceAllocatorManager::Tick(ExecutionSerial completedSerial) {
for (ResourceHeapAllocation& allocation :
mAllocationsToDelete.IterateUpTo(completedSerial)) {
if (allocation.refCount == 0 &&
allocation.GetInfo().mMethod == AllocationMethod::kSubAllocated) {
FreeSubAllocatedMemory(allocation);
} else {
// Still in use: defer deletion
DeferAllocation(allocation);
}
}
// Clear only those heaps that are confirmed unused
mAllocationsToDelete.RemoveIf([](auto& alloc) { return alloc.refCount == 0; });
mHeapsToDelete.RemoveIf([](auto& heap) { return heap.refCount == 0; });
}
This ensures that heap objects will not be freed prematurely, eliminating the race that leads to the use-after-free.
Summary
WebGPU dawn::native::d3d12::ResourceAllocatorManager::Tick Heap-Use-After-Free
Custom Questions
Type of crash:
see ASan
Crash state:
ASan stack trace
Heap-use-after-free (read) detected by ASan.
READ of size 4 at 0x12a6a8aec854 thread T0
#0 0x7ff8e93af829 in dawn::native::d3d12::Pageable::IsResidencyLocked(void) const C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\PageableD3D12.cpp:86:12
#1 0x7ff8e93c8159 in dawn::native::d3d12::ResidencyManager::EnsureHeapsAreResident(class dawn::native::d3d12::Heap **, unsigned __int64) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ResidencyManagerD3D12.cpp:263:19
#2 0x7ff8e9398acf in dawn::native::d3d12::CommandRecordingContext::ExecuteCommandList(class dawn::native::d3d12::Device *, struct ID3D12CommandQueue *) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\CommandRecordingContext.cpp:77:5
#3 0x7ff8e93bee55 in dawn::native::d3d12::Queue::SubmitPendingCommandsImpl(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\QueueD3D12.cpp:133:5
#4 0x7ff8e9163d98 in dawn::native::ExecutionQueueBase::SubmitPendingCommands(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\ExecutionQueue.cpp:112:19
#5 0x7ff8e93a4938 in dawn::native::d3d12::Device::TickImpl(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\DeviceD3D12.cpp:366:5
#6 0x7ff8e90c37d9 in dawn::native::DeviceBase::Destroy(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:665:22
#7 0x7ff8e8fa2258 in dawn::native::NativeDeviceDestroy(struct WGPUDeviceImpl *) C:\b\s\w\ir\cache\builder\src\out\069a-Win_ASan_Releas\gen\third_party\dawn\src\dawn\native\ProcTable.cpp:921:15
...
freed by thread T0 here:
#0 0x7ff96150c584 (C:\Users\wlsrb\Desktop\bugs\chromium-140.0.7317.0-win64-asan\clang_rt.asan_dynamic-x86_64.dll+0x18005c584)
#1 0x7ff8e93af1ce in dawn::native::d3d12::Heap::`scalar deleting dtor'(unsigned int) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\HeapD3D12.h:42:7
#2 0x7ff8e6f83124 in std::__Cr::default_delete<perfetto::internal::TracingMuxerImpl::ConsumerImpl>::operator() C:\b\s\w\ir\cache\builder\src\third_party\libc++\src\include\__memory\unique_ptr.h:77
#3 0x7ff8e6f83124 in std::__Cr::unique_ptr<perfetto::internal::TracingMuxerImpl::ConsumerImpl,std::__Cr::default_delete<perfetto::internal::TracingMuxerImpl::ConsumerImpl> >::reset C:\b\s\w\ir\cache\builder\src\third_party\libc++\src\include\__memory\unique_ptr.h:290
Reporter credit:
Giunash (Gyujeong Jin) of BoB 14th
Additional Data
Category: Security
Chrome Channel: Dev
Regression: N/A \
Context
This report describes a heap-use-after-free in Dawn, the WebGPU implementation used by Chromium. The affected component is the D3D12 backend, that is, the Direct3D 12 path Dawn uses on Windows. The bug was reported through the Chrome Vulnerability Reward Program (Chrome VRP) by Giunash (Gyujeong Jin) of BoB 14th, rated high severity, and disclosed on 2025-09-17. The platform records a bounty of 15,000 USD. The report gives reproduction steps, a root cause analysis, a suggested fix and an ASan stack trace. It does not include a full exploit chain, and it does not claim that the bug is reachable from ordinary web content beyond the WebGPU operations it describes.
Dawn's D3D12 backend manages GPU memory through heaps. A ResourceAllocatorManager tracks heap allocations that are scheduled for deletion, keyed by an ExecutionSerial that represents completed GPU work. When the GPU has finished work up to a given serial, the manager frees the allocations associated with that serial. A ResidencyManager then makes heaps resident before a command list is executed, which means it walks heap pointers and locks their residency.
The report states that the crash is observed only on Windows systems without a discrete GPU, for example integrated GPU or GPU-less notebook environments. The researcher ties the timing problem to asynchronous GPU command execution.
Setup
The report gives few environment details. What it does state:
- Target: Chromium, Chrome Channel Dev, with the Dawn D3D12 backend on Windows.
- Build used for the ASan trace: the paths in the stack trace reference
chromium-140.0.7317.0-win64-asan, and the generated build directory is069a-Win_ASan_Releas. The report does not otherwise describe the build configuration. - The reproduction uses a local HTTP server on port 8000 and a page called
PoC.html. - The
--no-sandboxflag is used so that ASan output is produced. - Regression: N/A, as recorded in the report's additional data.
The report does not describe any accounts, roles or remote services. Everything runs locally.
Finding it
The researcher describes the issue as a heap-use-after-free in the Dawn D3D12 backend of Chromium/WebGPU, triggered by resource lifetime mismanagement during asynchronous GPU command execution. The trigger is a combination of specific WebGPU operations:
- Creating large depth/stencil textures.
- Creating incompatible texture views.
- Issuing
copyTextureToBufferwith intentionally misaligned parameters.
Under those operations, the GPU process consistently crashes. On ASan builds the crash is reported as a heap-use-after-free. The researcher's reading is that ResourceAllocatorManager::Tick() is called with a completedSerial that Dawn believes covers all finished GPU work, but that in certain timing conditions commands still referencing the Heap objects have not been fully retired on the GPU. The manager therefore clears and frees heap resources too early. Later, ResidencyManager::EnsureHeapsAreResident() iterates over those heap pointers to lock residency before executing a new command list, and dereferences stale pointers to already-freed memory. The report calls this a reproducible use-after-free read, and says it could potentially be a write as well.
Exploitation
The report frames this as a crash reproduction rather than an exploitation chain. The steps below are exactly what it gives.
Step 1: start the local server and browser
Run open_PoC.bat. The report says this launches a local HTTP server and opens Chromium. The batch file is given in full:
@echo off
cd /d %~dp0
start "" python -m http.server 8000
timeout /t 2 >nul
start "" http://localhost:8000/PoC.html
The script changes to its own directory, starts Python's built-in HTTP server on port 8000, waits two seconds, then opens http://localhost:8000/PoC.html. The report does not show the contents of PoC.html, so the exact WebGPU calls (texture creation, view creation, the misaligned copyTextureToBuffer) are not reproduced here.
Step 2: launch Chromium with the PoC page
The report states that the page is navigated to with the --no-sandbox flag so that ASan output is produced, and gives the command as:
./chrome.exe --no-sandbox http://localhost:8000/PoC.html
--no-sandbox disables the Chromium sandbox for this run. The report's stated reason is ASan output, not a requirement of the bug itself.
Step 3: reload until the GPU process crashes
After a few reload cycles, the GPU process crashes. On ASan builds the report says you will see a heap-use-after-free.
What the crash looks like
The report includes an ASan stack trace. It is a read of size 4, detected by ASan, with the allocation freed earlier in the same thread. The trace is reproduced as given:
READ of size 4 at 0x12a6a8aec854 thread T0
#0 0x7ff8e93af829 in dawn::native::d3d12::Pageable::IsResidencyLocked(void) const C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\PageableD3D12.cpp:86:12
#1 0x7ff8e93c8159 in dawn::native::d3d12::ResidencyManager::EnsureHeapsAreResident(class dawn::native::d3d12::Heap **, unsigned __int64) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ResidencyManagerD3D12.cpp:263:19
#2 0x7ff8e9398acf in dawn::native::d3d12::CommandRecordingContext::ExecuteCommandList(class dawn::native::d3d12::Device *, struct ID3D12CommandQueue *) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\CommandRecordingContext.cpp:77:5
#3 0x7ff8e93bee55 in dawn::native::d3d12::Queue::SubmitPendingCommandsImpl(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\QueueD3D12.cpp:133:5
#4 0x7ff8e9163d98 in dawn::native::ExecutionQueueBase::SubmitPendingCommands(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\ExecutionQueue.cpp:112:19
#5 0x7ff8e93a4938 in dawn::native::d3d12::Device::TickImpl(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\DeviceD3D12.cpp:366:5
#6 0x7ff8e90c37d9 in dawn::native::DeviceBase::Destroy(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:665:22
#7 0x7ff8e8fa2258 in dawn::native::NativeDeviceDestroy(struct WGPUDeviceImpl *) C:\b\s\w\ir\cache\builder\src\out\069a-Win_ASan_Releas\gen\third_party\dawn\src\dawn\native\ProcTable.cpp:921:15
...
freed by thread T0 here:
#0 0x7ff96150c584 (C:\Users\wlsrb\Desktop\bugs\chromium-140.0.7317.0-win64-asan\clang_rt.asan_dynamic-x86_64.dll+0x18005c584)
#1 0x7ff8e93af1ce in dawn::native::d3d12::Heap::`scalar deleting dtor'(unsigned int) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\HeapD3D12.h:42:7
#2 0x7ff8e6f83124 in std::__Cr::default_delete<perfetto::internal::TracingMuxerImpl::ConsumerImpl>::operator() C:\b\s\w\ir\cache\builder\src\third_party\libc++\src\include\__memory\unique_ptr.h:77
#3 0x7ff8e6f83124 in std::__Cr::unique_ptr<perfetto::internal::TracingMuxerImpl::ConsumerImpl,std::__Cr::default_delete<perfetto::internal::TracingMuxerImpl::ConsumerImpl> >::reset C:\b\s\w\ir\cache\builder\src\third_party\libc++\src\include\__memory\unique_ptr.h:290
The read happens in Pageable::IsResidencyLocked() at PageableD3D12.cpp:86, called from ResidencyManager::EnsureHeapsAreResident() at ResidencyManagerD3D12.cpp:263. That call chain is reached from CommandRecordingContext::ExecuteCommandList(), then Queue::SubmitPendingCommandsImpl(), ExecutionQueueBase::SubmitPendingCommands(), Device::TickImpl(), DeviceBase::Destroy() and finally NativeDeviceDestroy(). The read happens in Pageable::IsResidencyLocked() and the free happens earlier in the same thread. The free side of the trace shows the Heap object being destroyed through its scalar deleting destructor at HeapD3D12.h:42.
Root cause
The report points to third_party/dawn/src/dawn/native/d3d12/ResourceAllocatorManagerD3D12.cpp and quotes the Tick() function:
void ResourceAllocatorManager::Tick(ExecutionSerial completedSerial) {
for (ResourceHeapAllocation& allocation :
mAllocationsToDelete.IterateUpTo(completedSerial)) {
if (allocation.GetInfo().mMethod == AllocationMethod::kSubAllocated) {
FreeSubAllocatedMemory(allocation);
}
}
mAllocationsToDelete.ClearUpTo(completedSerial);
mHeapsToDelete.ClearUpTo(completedSerial);
}
Tick() is called with a completedSerial that Dawn believes corresponds to all finished GPU work. The researcher argues that under certain timing conditions, commands that still reference these Heap objects may not yet be fully retired on the GPU. The manager then clears and frees heap resources prematurely. When ResidencyManager::EnsureHeapsAreResident() later iterates over those heap pointers to lock residency before executing a new command list, it dereferences stale pointers to already-freed memory. The result is the reproducible use-after-free read, and potentially a write.
The report does not discuss any existing checks that might have caught the premature free. It proposes reference counting instead of relying solely on completedSerial.
Impact
The report's impact statement is narrow: when the specific WebGPU operations are performed (large depth/stencil textures, incompatible texture views, and copyTextureToBuffer with intentionally misaligned parameters), the GPU process consistently crashes. The crash is a heap-use-after-free read, with the possibility of a write. The report does not demonstrate code execution, information disclosure, sandbox escape or any other security consequence, and it does not claim that the bug is reachable from a normal web page without the described operations. The platform rates it high severity. The conditions stated in the report are Windows systems without a discrete GPU, and the reproduction uses --no-sandbox for ASan output.
Fix
The report proposes a fix rather than describing one that was applied. It says the root cause is that ResourceAllocatorManager::Tick() may free ResourceHeapAllocation objects that are still referenced by in-flight GPU commands, and that the fix is to introduce reference counting (or strong ownership tracking) for heap allocations instead of relying solely on completedSerial. The key steps it lists are:
- Add a ref-count to
ResourceHeapAllocation/Heapobjects. Increment it when a command list or texture/buffer references a heap, and decrement it only after the GPU has signalled completion of the work using that heap. - Modify
Tick()to defer freeing. Instead of callingFreeSubAllocatedMemory()andClearUpTo()immediately, check whether the ref-count for eachallocationhas reached 0, and only free and clear entries when no active references remain. - Validation. Optionally add debug assertions (in ASan/Debug builds) to ensure that no heap is accessed after free. This prevents use-after-free bugs when commands complete later than
completedSerialsuggests.
The report also gives pseudo-code for the adjusted Tick():
void ResourceAllocatorManager::Tick(ExecutionSerial completedSerial) {
for (ResourceHeapAllocation& allocation :
mAllocationsToDelete.IterateUpTo(completedSerial)) {
if (allocation.refCount == 0 &&
allocation.GetInfo().mMethod == AllocationMethod::kSubAllocated) {
FreeSubAllocatedMemory(allocation);
} else {
// Still in use: defer deletion
DeferAllocation(allocation);
}
}
// Clear only those heaps that are confirmed unused
mAllocationsToDelete.RemoveIf([](auto& alloc) { return alloc.refCount == 0; });
mHeapsToDelete.RemoveIf([](auto& heap) { return heap.refCount == 0; });
}
The report says this ensures heap objects are not freed prematurely, eliminating the race that leads to the use-after-free.
Variants to test
The report does not list variants. The following are suggestions for further testing, derived from its own reasoning, not from the report:
- Other WebGPU resource types that go through
ResourceAllocatorManageron D3D12. A positive result is an ASan heap-use-after-free inPageable::IsResidencyLocked()orResidencyManager::EnsureHeapsAreResident()under repeated submission and device destruction. - Different timing patterns around
Device::Destroy(). The trace shows the read duringNativeDeviceDestroy(), so forcing pending submissions at teardown is a plausible way to widen the window. A positive result is the same stale heap dereference. - Hardware variation. The report says the bug is observed only on Windows systems without a discrete GPU. Running the same PoC on machines with and without a discrete GPU would show whether the condition is a hard requirement or a timing artefact.
- Other backends. The report is specific to D3D12. Checking whether the same serial-based deletion pattern exists in other Dawn backends would show whether the design issue is broader, though the report gives no evidence either way.
Each of these should be treated as unverified until a crash or a concrete code path is shown.
What happened, in plain words
A security researcher found a bug in a part of Google Chrome that draws 3D graphics on web pages. The bug makes a Chrome helper process crash. The report does not show how an attacker could use it to run code or read data. The researcher reported it through Google's bug bounty programme, and Google paid a reward of 15,000 USD. The bug is rated high severity and was disclosed on 2025-09-17.
The bug is a type called a use-after-free. Imagine you borrow a library book, return it, and then later try to read a note you wrote on page 42. The book may have been given to someone else, or destroyed. Reading it is a mistake. In computer memory, a use-after-free happens when a program frees a block of memory and then later reads or writes to it as if it were still owned. That can crash the program, or worse, let an attacker control what happens.
This particular bug lives in Dawn, which is the part of Chrome that implements WebGPU. WebGPU is a modern web standard that lets websites use the computer's graphics card (GPU) for heavy calculations and 3D rendering. Dawn translates WebGPU commands into the native graphics API of the operating system. On Windows, one of those native APIs is Direct3D 12 (D3D12). The bug is in Dawn's D3D12 backend, so it only affects Windows machines using that path.
The researcher found that by asking a web page to do a few specific graphics operations, the GPU process (a separate Chrome process that talks to the graphics card) crashes reliably. The crash is detected by a tool called AddressSanitizer (ASan), which is a memory error detector used in testing builds. The report includes the exact steps to reproduce, an analysis of the root cause, a suggested fix, and the ASan stack trace.
The report does not show a full attack that takes over the computer. It shows a crash and explains why it happens. The platform rates it high severity.
Context
This section explains the background: what Dawn is, what D3D12 is, and what the report contains.
Dawn is an open-source library inside Chromium (the open-source project behind Chrome) that implements WebGPU. WebGPU is an API (Application Programming Interface), which is a set of rules that lets one piece of software talk to another. Think of an API as a restaurant menu: you order from a fixed list, and the kitchen prepares it. WebGPU lets a website order graphics operations from the browser, and the browser passes them to the graphics driver.
Dawn has several backends. A backend is a translation layer that turns WebGPU commands into the native commands of a particular platform. On Windows, the main backend is D3D12 (Direct3D 12), Microsoft's low-level graphics API. On macOS it might be Metal, on Linux Vulkan, and so on. This bug is in the D3D12 backend.
The report was submitted through the Chrome Vulnerability Reward Program (Chrome VRP). That is Google's bug bounty programme: researchers who find security bugs in Chrome can report them and receive a cash reward. The researcher is credited as Giunash (Gyujeong Jin) of BoB 14th.
The platform records the severity as high and the bounty as 15,000 USD. The report itself is an advisory: it describes the bug, how to reproduce it, and how to fix it, but it is not a full exploit write-up.
Dawn's D3D12 backend manages GPU memory using heaps. A heap is a large block of memory that the program carves into smaller pieces. The ResourceAllocatorManager is the component that tracks which pieces are in use and which can be freed. It schedules deletions by an ExecutionSerial, which is a number that represents a point in the GPU's work queue. When the GPU finishes work up to a certain serial number, the manager frees the allocations associated with that serial. A ResidencyManager then makes heaps resident before a command list is executed. Resident means the heap is locked in GPU memory so it will not be moved or evicted. To do that, the ResidencyManager walks through heap pointers and locks their residency.
The report states that the crash is observed only on Windows systems without a discrete GPU. A discrete GPU is a separate graphics card, like an NVIDIA or AMD card you plug into a slot. The alternative is an integrated GPU, which is built into the CPU, or a system with no GPU at all (a notebook that relies on software rendering). The researcher ties the timing problem to asynchronous GPU command execution on such systems. Asynchronous means the CPU and GPU run independently: the CPU submits commands and does not wait for the GPU to finish before doing other things.
Setup
The report gives few details about the environment. Here is what it does state:
- Target: Chromium, on the Dev channel. Chrome has several release channels: Stable (most tested), Beta, Dev (newer features, less tested), and Canary (daily builds). The Dev channel is used for testing new code.
- Build used for the ASan trace: The paths in the stack trace mention
chromium-140.0.7317.0-win64-asan. That is a Windows 64-bit build of Chromium version 140.0.7317.0 with AddressSanitizer enabled. The generated build directory is069a-Win_ASan_Releas. - Reproduction environment: A local HTTP server on port 8000 and a page called
PoC.html. A local HTTP server is a small web server running on your own computer that serves files to your browser. Port 8000 is just a number that identifies the server; it is not special. - The
--no-sandboxflag: This is a command-line option that disables the Chromium sandbox. The sandbox is a security mechanism that runs each part of Chrome in a restricted environment so that if one part is compromised, it cannot easily harm the rest of the system. The report says the flag is used so that ASan output is produced. - Regression: N/A. A regression is a bug that was introduced by a recent change. The report records the regression field as N/A.
Everything runs locally on the researcher's machine.
Finding it
The researcher describes the issue as a heap-use-after-free in the Dawn D3D12 backend of Chromium/WebGPU, triggered by resource lifetime mismanagement during asynchronous GPU command execution. Resource lifetime management is the practice of keeping track of when a resource (like a block of memory) is created, used, and destroyed. If you free a resource while something still needs it, you get a use-after-free.
The trigger is a combination of three specific WebGPU operations:
- Creating large depth/stencil textures. A texture is an image stored in GPU memory. A depth/stencil texture is a special kind of texture used in 3D rendering to figure out which objects are in front of others (depth) and which pixels should be drawn (stencil). Large means it takes a lot of memory.
- Creating incompatible texture views. A texture view is a way to look at a texture with different settings, for example treating it as a different format or using only part of it.
- Issuing
copyTextureToBufferwith intentionally misaligned parameters.copyTextureToBufferis a WebGPU command that copies data from a texture into a buffer (a linear block of memory). Misaligned parameters means the sizes or offsets do not meet the alignment requirements that GPUs often have. The researcher intentionally uses bad values to stress the code path.
When these operations are performed, the GPU process consistently crashes. On ASan builds, the crash is reported as a heap-use-after-free.
The researcher's explanation: ResourceAllocatorManager::Tick() is called with a completedSerial that Dawn believes covers all finished GPU work. But under certain timing conditions, commands that still reference the Heap objects have not been fully retired on the GPU. The manager therefore clears and frees heap resources too early. Later, ResidencyManager::EnsureHeapsAreResident() iterates over those heap pointers to lock residency before executing a new command list, and it dereferences stale pointers to already-freed memory. A stale pointer is a pointer that used to be valid but now points to memory that has been freed or reused. The report calls this a reproducible use-after-free read, and says it could potentially be a write as well. A read means the program reads from the freed memory; a write means it writes to it. Writes are generally more dangerous because they can corrupt data or control flow.
Exploitation
The report frames this as a crash reproduction rather than an exploitation chain. An exploitation chain is a series of steps that turns a bug into a full attack, like running arbitrary code. The report does not provide one. The steps below are exactly what it gives.
Step 1: start the local server and browser
Run open_PoC.bat. The report says this launches a local HTTP server and opens Chromium. The batch file is given in full:
@echo off
cd /d %~dp0
start "" python -m http.server 8000
timeout /t 2 >nul
start "" http://localhost:8000/PoC.html
This is a Windows batch script (.bat). Let's go through it line by line:
@echo off: turns off the echoing of commands in the console window, so you only see the output, not each command as it runs.cd /d %~dp0: changes the current directory to the directory where the batch file is located.%~dp0is a special variable that expands to the drive and path of the script. The/dswitch allows changing the drive if necessary.start "" python -m http.server 8000: starts a new window running Python's built-in HTTP server module on port 8000. The empty quotes""are a title for the window (required bystartwhen the first argument is quoted). This server will serve files from the current directory.timeout /t 2 >nul: waits for 2 seconds.>nulredirects any output to the null device, so you don't see the countdown. This gives the server time to start.start "" http://localhost:8000/PoC.html: opens the default web browser to the URLhttp://localhost:8000/PoC.html.localhostmeans your own computer. The pagePoC.htmlis served by the Python server.
That means we cannot see the precise JavaScript that triggers the bug. The report only describes the operations in words.
Step 2: launch Chromium with the PoC page
The report states that the page is navigated to with the --no-sandbox flag so that ASan output is produced, and gives the command as:
./chrome.exe --no-sandbox http://localhost:8000/PoC.html
This is a command line to start Chrome. ./chrome.exe means run the chrome.exe executable in the current directory. --no-sandbox disables the Chromium sandbox for this run. The report's stated reason is to get ASan output, not because the bug requires it. The URL is the same PoC page.
Step 3: reload until the GPU process crashes
After a few reload cycles, the GPU process crashes. On ASan builds the report says you will see a heap-use-after-free. Reloading the page re-runs the WebGPU operations, increasing the chance that the timing lines up to trigger the bug. This is common with race conditions: bugs that depend on the precise order of events. A race condition is like two people trying to sit in the same chair at the same time; the outcome depends on who gets there first.
What the crash looks like
The report includes an ASan stack trace. A stack trace is a list of function calls that were active when the crash happened, like a receipt of the program's call history. It is a read of size 4, detected by ASan, with the allocation freed earlier in the same thread. A thread is a sequence of instructions executed by the CPU; programs can have multiple threads running concurrently. The trace is reproduced as given:
READ of size 4 at 0x12a6a8aec854 thread T0
#0 0x7ff8e93af829 in dawn::native::d3d12::Pageable::IsResidencyLocked(void) const C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\PageableD3D12.cpp:86:12
#1 0x7ff8e93c8159 in dawn::native::d3d12::ResidencyManager::EnsureHeapsAreResident(class dawn::native::d3d12::Heap **, unsigned __int64) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ResidencyManagerD3D12.cpp:263:19
#2 0x7ff8e9398acf in dawn::native::d3d12::CommandRecordingContext::ExecuteCommandList(class dawn::native::d3d12::Device *, struct ID3D12CommandQueue *) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\CommandRecordingContext.cpp:77:5
#3 0x7ff8e93bee55 in dawn::native::d3d12::Queue::SubmitPendingCommandsImpl(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\QueueD3D12.cpp:133:5
#4 0x7ff8e9163d98 in dawn::native::ExecutionQueueBase::SubmitPendingCommands(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\ExecutionQueue.cpp:112:19
#5 0x7ff8e93a4938 in dawn::native::d3d12::Device::TickImpl(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\DeviceD3D12.cpp:366:5
#6 0x7ff8e90c37d9 in dawn::native::DeviceBase::Destroy(void) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:665:22
#7 0x7ff8e8fa2258 in dawn::native::NativeDeviceDestroy(struct WGPUDeviceImpl *) C:\b\s\w\ir\cache\builder\src\out\069a-Win_ASan_Releas\gen\third_party\dawn\src\dawn\native\ProcTable.cpp:921:15
...
freed by thread T0 here:
#0 0x7ff96150c584 (C:\Users\wlsrb\Desktop\bugs\chromium-140.0.7317.0-win64-asan\clang_rt.asan_dynamic-x86_64.dll+0x18005c584)
#1 0x7ff8e93af1ce in dawn::native::d3d12::Heap::`scalar deleting dtor'(unsigned int) C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\HeapD3D12.h:42:7
#2 0x7ff8e6f83124 in std::__Cr::default_delete<perfetto::internal::TracingMuxerImpl::ConsumerImpl>::operator() C:\b\s\w\ir\cache\builder\src\third_party\libc++\src\include\__memory\unique_ptr.h:77
#3 0x7ff8e6f83124 in std::__Cr::unique_ptr<perfetto::internal::TracingMuxerImpl::ConsumerImpl,std::__Cr::default_delete<perfetto::internal::TracingMuxerImpl::ConsumerImpl> >::reset C:\b\s\w\ir\cache\builder\src\third_party\libc++\src\include\__memory\unique_ptr.h:290
This is a stack trace from AddressSanitizer. Let's break it down:
READ of size 4 at 0x12a6a8aec854 thread T0: ASan detected a read of 4 bytes at memory address0x12a6a8aec854on thread T0. The address is a hexadecimal number; it is the location in memory that was accessed. The size 4 means it read 4 bytes.- The lines starting with
#0,#1, etc. are the call stack at the moment of the read.#0is the innermost function, where the read happened.#1is the function that called#0, and so on. The paths show the source file and line number. #0isdawn::native::d3d12::Pageable::IsResidencyLocked(void) constatPageableD3D12.cpp:86:12. This function is where the stale heap is read.#1isdawn::native::d3d12::ResidencyManager::EnsureHeapsAreResident(class dawn::native::d3d12::Heap **, unsigned __int64)atResidencyManagerD3D12.cpp:263:19. This function ensures heaps are resident before a command list is executed.#2isCommandRecordingContext::ExecuteCommandListatCommandRecordingContext.cpp:77:5. This is where a command list is executed on the GPU.#3isQueue::SubmitPendingCommandsImplatQueueD3D12.cpp:133:5. This submits pending commands to the GPU queue.#4isExecutionQueueBase::SubmitPendingCommandsatExecutionQueue.cpp:112:19. This is a base class method that triggers submission.#5isDevice::TickImplatDeviceD3D12.cpp:366:5. This is a periodic tick that processes pending work.#6isDeviceBase::DestroyatDevice.cpp:665:22. This is called when the device is being destroyed.#7isNativeDeviceDestroyatProcTable.cpp:921:15. This is the entry point from the WebGPU C API to destroy the device.- The
...indicates that more frames were omitted. - Then
freed by thread T0 here:begins the stack trace of where the memory was freed.#0is the ASan runtime itself (theclang_rt.asan_dynamic-x86_64.dll).#1isdawn::native::d3d12::Heap::scalar deleting dtor'atHeapD3D12.h:42:7. This is the destructor of theHeapobject, called when the object is deleted.#2and#3are from the C++ standard library'sunique_ptr` (a smart pointer that automatically deletes its object when it goes out of scope).
In plain words: the program read a flag from a Heap object that had already been freed. The read happened while the device was being destroyed and pending commands were being submitted. The free happened earlier, when the Heap object was deleted.
Root cause
The report points to third_party/dawn/src/dawn/native/d3d12/ResourceAllocatorManagerD3D12.cpp and quotes the Tick() function:
void ResourceAllocatorManager::Tick(ExecutionSerial completedSerial) {
for (ResourceHeapAllocation& allocation :
mAllocationsToDelete.IterateUpTo(completedSerial)) {
if (allocation.GetInfo().mMethod == AllocationMethod::kSubAllocated) {
FreeSubAllocatedMemory(allocation);
}
}
mAllocationsToDelete.ClearUpTo(completedSerial);
mHeapsToDelete.ClearUpTo(completedSerial);
}
This is C++ code. Let's go through it line by line:
void ResourceAllocatorManager::Tick(ExecutionSerial completedSerial) {: defines a function namedTickthat belongs to theResourceAllocatorManagerclass. It takes one parameter,completedSerial, of typeExecutionSerial.voidmeans it returns nothing.for (ResourceHeapAllocation& allocation : mAllocationsToDelete.IterateUpTo(completedSerial)) {: this is a range-based for loop. It iterates over a collection returned bymAllocationsToDelete.IterateUpTo(completedSerial).mAllocationsToDeleteis a member variable that holds allocations scheduled for deletion.IterateUpToreturns the allocations whose serial number is less than or equal tocompletedSerial. Each element is a reference to aResourceHeapAllocationobject, namedallocation.if (allocation.GetInfo().mMethod == AllocationMethod::kSubAllocated) {: checks if the allocation method iskSubAllocated. Sub-allocated means the allocation is a piece carved out of a larger heap. If so, it needs special freeing.FreeSubAllocatedMemory(allocation);: frees the sub-allocated memory.}closes the if.}closes the for loop.mAllocationsToDelete.ClearUpTo(completedSerial);: removes all entries up tocompletedSerialfrom the deletion list, regardless of whether they were freed or not. This removes entries up tocompletedSerialfrom the deletion list.mHeapsToDelete.ClearUpTo(completedSerial);: similarly clears the list of heaps to delete.}closes the function.
The researcher argues that Tick() is called with a completedSerial that Dawn believes corresponds to all finished GPU work. But under certain timing conditions, commands that still reference these Heap objects may not yet be fully retired on the GPU. The manager then clears and frees heap resources prematurely. When ResidencyManager::EnsureHeapsAreResident() later iterates over those heap pointers to lock residency before executing a new command list, it dereferences stale pointers to already-freed memory. The result is the reproducible use-after-free read, and potentially a write.
The report does not identify which specific defence failed, nor does it say whether any existing check should have caught the premature free. It presents the serial-based deletion as the design flaw: freeing is driven solely by completedSerial, without tracking whether any command list or resource still holds a reference to the heap.
Impact
The report's impact statement is narrow: when the specific WebGPU operations are performed (large depth/stencil textures, incompatible texture views, and copyTextureToBuffer with intentionally misaligned parameters), the GPU process consistently crashes. The crash is a heap-use-after-free read, with the possibility of a write. The report does not demonstrate code execution, information disclosure, sandbox escape or any other security consequence, and it does not claim that the bug is reachable from a normal web page without the described operations. The platform rates it high severity. The conditions stated in the report are Windows systems without a discrete GPU, and the reproduction uses --no-sandbox for ASan output.
In other words, the immediate effect is that the GPU process crashes. A denial of service is when a service is made unavailable to its users. The report does not go into that.
Fix
The report proposes a fix rather than describing one that was applied. It says the root cause is that ResourceAllocatorManager::Tick() may free ResourceHeapAllocation objects that are still referenced by in-flight GPU commands, and that the fix is to introduce reference counting (or strong ownership tracking) for heap allocations instead of relying solely on completedSerial. Reference counting is a technique where each object keeps a count of how many references point to it. When the count drops to zero, the object is freed. It is like a room that stays locked until the last visitor has left.
The key steps it lists are:
- Add a ref-count to
ResourceHeapAllocation/Heapobjects. Increment it when a command list or texture/buffer references a heap, and decrement it only after the GPU has signalled completion of the work using that heap. - Modify
Tick()to defer freeing. Instead of callingFreeSubAllocatedMemory()andClearUpTo()immediately, check whether the ref-count for eachallocationhas reached 0, and only free and clear entries when no active references remain. - Validation. Optionally add debug assertions (in ASan/Debug builds) to ensure that no heap is accessed after free. This prevents use-after-free bugs when commands complete later than
completedSerialsuggests. A debug assertion is a check that runs only in debug builds and aborts the program if a condition is false, helping catch bugs early.
The report also gives pseudo-code for the adjusted Tick():
void ResourceAllocatorManager::Tick(ExecutionSerial completedSerial) {
for (ResourceHeapAllocation& allocation :
mAllocationsToDelete.IterateUpTo(completedSerial)) {
if (allocation.refCount == 0 &&
allocation.GetInfo().mMethod == AllocationMethod::kSubAllocated) {
FreeSubAllocatedMemory(allocation);
} else {
// Still in use: defer deletion
DeferAllocation(allocation);
}
}
// Clear only those heaps that are confirmed unused
mAllocationsToDelete.RemoveIf([](auto& alloc) { return alloc.refCount == 0; });
mHeapsToDelete.RemoveIf([](auto& heap) { return heap.refCount == 0; });
}
Let's explain the changes:
- The
ifcondition now also checksallocation.refCount == 0. It only frees if the ref-count is zero and the allocation is sub-allocated. - The
elsebranch callsDeferAllocation(allocation), which presumably moves the allocation to a later deletion list or leaves it for later. The report does not defineDeferAllocation, but the intent is to postpone freeing. - Instead of
ClearUpTo, it usesRemoveIfwith a lambda (an inline function) that checksalloc.refCount == 0. This removes only those entries whose ref-count is zero, leaving the others in the list for future ticks. - Similarly for
mHeapsToDelete.
The report says this ensures heap objects are not freed prematurely, eliminating the race that leads to the use-after-free.
Variants to test
The report does not list variants. The following are suggestions for further testing, derived from its own reasoning, not from the report:
- Other WebGPU resource types that go through
ResourceAllocatorManageron D3D12. A positive result is an ASan heap-use-after-free inPageable::IsResidencyLocked()orResidencyManager::EnsureHeapsAreResident()under repeated submission and device destruction. - Different timing patterns around
Device::Destroy(). The trace shows the read duringNativeDeviceDestroy(), so forcing pending submissions at teardown is a plausible way to widen the window. A positive result is the same stale heap dereference. - Hardware variation. The report says the bug is observed only on Windows systems without a discrete GPU. Running the same PoC on machines with and without a discrete GPU would show whether the condition is a hard requirement or a timing artefact.
- Other backends. The report is specific to D3D12. Checking whether the same serial-based deletion pattern exists in other Dawn backends would show whether the design issue is broader, though the report gives no evidence either way.
Each of these should be treated as unverified until a crash or a concrete code path is shown.
Glossary
- API: Application Programming Interface; a set of rules and definitions that lets one piece of software talk to another.
- ASan (AddressSanitizer): a memory error detector that instruments programs to catch bugs like use-after-free, buffer overflows, and memory leaks at runtime.
- Asynchronous: not waiting for one operation to finish before starting another; the CPU and GPU can work independently.
- Backend: in graphics, a translation layer that turns a high-level API (like WebGPU) into a platform-specific API (like D3D12, Metal, or Vulkan).
- Batch file (.bat): a script file for Windows that contains a series of commands to be executed by the command interpreter.
- Buffer: a linear block of memory used to store data, often on the GPU.
- Bug bounty programme: a programme that rewards researchers for finding and reporting security vulnerabilities.
- Chrome VRP: Chrome Vulnerability Reward Program, Google's bug bounty for Chrome.
- Command list: a recorded sequence of GPU commands that can be submitted to a queue for execution.
- completedSerial: a number representing the point in the GPU work queue up to which work is known to be complete.
- D3D12 (Direct3D 12): Microsoft's low-level graphics API for Windows.
- Dawn: Chromium's implementation of WebGPU.
- Debug assertion: a check that runs only in debug builds and aborts if a condition is false.
- Denial of service: an attack or bug that makes a service unavailable to its users.
- Depth/stencil texture: a texture used in 3D rendering to store depth (distance from camera) and stencil (masking) information.
- Discrete GPU: a separate graphics card, as opposed to an integrated GPU built into the CPU.
- ExecutionSerial: a numeric identifier for a point in the GPU's execution timeline.
- GPU process: a separate process in Chrome that handles communication with the graphics card.
- Heap: a large block of memory from which smaller allocations are carved out.
- Heap-use-after-free: a bug where memory is accessed after it has been freed.
- Integrated GPU: a graphics processor built into the CPU.
- Lambda: an anonymous function in C++.
- Misaligned parameters: values that do not meet alignment requirements, such as a row pitch not being a multiple of a certain number.
- Native API: the API provided by the operating system or hardware, as opposed to a cross-platform API.
--no-sandbox: a Chrome command-line flag that disables the sandbox.- Pageable: a resource that can be moved in and out of GPU memory.
- Perfetto: a tracing library used in Chromium.
- Pseudo-code: code that is not meant to be compiled but illustrates an algorithm.
- Race condition: a bug that depends on the timing of events, where the outcome is unpredictable.
- Reference counting: a technique where each object counts how many references point to it and frees itself when the count reaches zero.
- Regression: a bug introduced by a change that previously worked.
- Residency: the state of being locked in GPU memory so it cannot be evicted.
- Resource lifetime: the period from when a resource is created to when it is destroyed.
- Sandbox: a security mechanism that restricts what a process can do.
- Scalar deleting destructor: a C++ compiler-generated function that destroys an object and frees its memory.
- Stack trace: a list of function calls that were active at a particular point, often at a crash.
- Stale pointer: a pointer that points to memory that has been freed or reused.
- Sub-allocated: memory that is carved out of a larger heap.
- Texture: an image stored in GPU memory.
- Texture view: a way to interpret a texture with different properties.
- Thread: a sequence of instructions executed by the CPU.
- unique_ptr: a C++ smart pointer that owns an object and deletes it when it goes out of scope.
- Use-after-free: a bug where memory is accessed after it has been freed.
- WebGPU: a web standard that allows web pages to use the GPU for computations and rendering.
- Write: in the context of memory access, writing data to a memory location.