Skip to content
Race condition Advisory Advanced CVE-2026-14424

Use after free in Dawn (CVE-2026-14424)

A race condition in Dawn's wire server on macOS lets a compromised renderer trigger a use-after-free read: a background Metal driver thread can still be copying from a mapped buffer while the main thread destroys the device and clears the buffer's backing allocation. This could leak reclaimed GPU driver memory into memory the renderer can see.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 33 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A potential race condition in the Dawn wire server allows a compromised renderer to bypass mapState synchronization during DeviceDestroy. When spontaneous callbacks are enabled, a background driver thread can execute OnBufferMapAsyncCallback and read from the driver-mapped pointer of an MTLBuffer while the main thread concurrently destroys the buffer and clears its backing allocation.

Affected files:

  • third_party/dawn/src/dawn/wire/server/ServerBuffer.cpp
  • third_party/dawn/src/dawn/dawn_wire.json
  • third_party/dawn/src/dawn/native/metal/BufferMTL.mm
  • third_party/dawn/src/dawn/native/Device.cpp

Estimated timestamp from git blame: 2025-09-03

Description

A potential Use-After-Free (UAF) read vulnerability exists in the WebGPU/Dawn graphics component of Chromium on the macOS/Metal platform. The issue arises from a synchronization mismatch between Dawn's wire server-side mutex (ServerBase::mMutex) and native Dawn device/buffer destruction sequence.

Root Cause Analysis

  1. When the Dawn wire server is instantiated on macOS, it is typically configured with useSpontaneousCallbacks = true because features::kWebGPUSpontaneousWireServer is enabled by default (see gpu/command_buffer/service/webgpu_decoder_impl.cc line 137).
  2. Spontaneous mapping callbacks (like OnBufferMapAsyncCallback) are invoked via the ForwardToServerHelper::Callback helper which acquires the server-side mutex via auto serverGuard = server.get()->GetGuard(); (see third_party/dawn/src/dawn/wire/server/Server.h line 103). This serializes spontaneous callbacks against other wire server commands.
  3. However, DeviceDestroy does not acquire the wire server-side mutex. When a compromised renderer sends a DeviceDestroy command, the GPU main thread directly executes native DeviceBase::APIDestroy() (in third_party/dawn/src/dawn/native/Device.cpp line 642).
  4. During DeviceBase::Destroy(), the GPU main thread blocks in mQueue->WaitForIdleForDestruction() (line 595), waiting on the mCompletedSerial condition variable for outstanding commands to finish.
  5. Once the command buffer finishes executing, the background Metal driver thread fires the completion block registered via addCompletedHandler: (in third_party/dawn/src/dawn/native/metal/QueueMTL.mm line 236), which calls UpdateCompletedSerialTo on the background thread.
  6. On the background thread, UpdateCompletedSerialTo does two things concurrently/sequentially:
    • It marks the MapAsyncEvent as ready, which triggers spontaneous execution of OnBufferMapAsyncCallback on the background thread. The callback enters the server critical section (GetGuard()) and begins copying data from mMtlBuffer contents.
    • It updates mCompletedSerial to the completed serial, which immediately wakes up the main thread waiting in WaitForIdleForDestruction().
  7. Since the GPU main thread's destruction sequence does not hold the wire server mutex (ServerBase::mMutex), the main thread resumes and proceeds immediately to DestroyObjects() (line 577), iterating to Buffer::DestroyImpl() and setting mMtlBuffer = nullptr (line 237).
  8. The background thread, still executing OnBufferMapAsyncCallback, is left reading from the deallocated/cleared id<MTLBuffer> resource, resulting in a use-after-free read of GPU driver-allocated memory.

Potential Attack Scenario / Steps to Reproduce

Note: These steps are theoretical as our environment does not support executing or validating live graphics exploits.

  1. From a compromised renderer, create a large mappable buffer (e.g., 128 MB) with MapRead and CopyDst usage.
  2. Submit a queue operation touching the buffer, then issue BufferMapAsync(READ, 0, size) and flush.
  3. Wait until the Metal completion handler is about to execute.
  4. Send a DeviceDestroy command and flush.
  5. The GPU main thread executes DeviceDestroy and frees the MTLBuffer backing on the main thread while the background thread is copying memory from the mapping pointer, leaking reclaimed driver-allocated bytes into the shared memory backing visible to the renderer.

Suggested Fix

To remediate this issue, ensure that DeviceDestroy is listed under server_custom_pre_handler_commands in third_party/dawn/src/dawn/dawn_wire.json (line 357). This will generate a custom pre-handler for DeviceDestroy that acquires the appropriate locks and cleans up pending client/server mapping handles before initiating backend device destruction.

Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 DeviceDestroy wire command does not take the wire server mutex, so native device and buffer destruction can run concurrently with a spontaneous map callback that is still reading the buffer.

Impact

A compromised renderer could read reclaimed GPU driver-allocated bytes through the shared memory backing, though the report notes the steps are theoretical and were not executed or validated.

What the attacker needed

Compromised renderer; macOS with Metal backend; spontaneous wire server callbacks enabled

The fix

DeviceDestroy should be listed under server_custom_pre_handler_commands so a generated pre-handler takes the locks and cleans up pending mapping handles before backend destruction begins.

How it was found

  1. From a compromised renderer, create a large mappable buffer with read and copy-destination usage.
  2. Submit a queue operation on the buffer, then request an asynchronous read mapping and flush.
  3. Wait until the Metal completion handler is about to run.
  4. Send a device destroy command and flush.
  5. The main thread frees the buffer backing while the background thread is still copying from the mapping pointer.

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 is when one part of a program frees a chunk of memory while another part is still reading it, so the reader may see data that has since been reused for something else. Here two threads in the graphics layer act at the same time: one is copying out of a buffer, the other is tearing the buffer down. The report says a renderer that is already compromised could exploit this timing to read memory it should not see.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.