Skip to content
Memory corruption Advisory Advanced CVE-2026-9874

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

A hash map caching specialised Vulkan descriptor layouts in Dawn's WebGPU backend is accessed from both a background worker thread and the main GPU thread without a lock. A crafted page that forces cache misses while an async compute pipeline is being built can race a lookup against a rehash, causing a heap use-after-free in the GPU process.

Anonymous Follow

Originally disclosed on Chrome VRP

Bounty$11,000 Critical View original
  • Fix shipped in 50 days

VULNERABILITY DETAILS

WebGPU supports compiling compute pipelines asynchronously via the createComputePipelineAsync API. This spawns background task worker threads in ThreadPoolForeg to initialize the pipeline in the backend. During backend layout construction, BindGroupLayout leverages an absl::flat_hash_map named mSpecializations to cache and specialize Vulkan descriptor sets and layouts based on ExternalTexture parameters.

In BindGroupLayout::GetOrCreateSpecializedHandle, the asynchronous background thread invokes find to look up an existing layout for the given specialization [0]. However, there is no synchronization or mutex protecting concurrent accesses to this absl::flat_hash_map.

Concurrently, the front-end JS can trigger operations on the main GPU thread, such as executing queue.submit with alternating ExternalTexture bindings to continuously incur cache misses on newly allocated combinations. Because of the intentional cache misses, GetOrCreateSpecializedHandle executes on the main GPU thread and frequently inserts new items into the same hash map [1].

C++
ResultOrError<VkDescriptorSetLayout> BindGroupLayout::GetOrCreateSpecializedHandle(
    const Specialization& specialization) {
    if (auto it = mSpecializations.find(specialization); it != mSpecializations.end()) { // [0]
        return it->second; // [2]
    }

// ...

    VkDescriptorSetLayout specialized;
    DAWN_TRY(
        CheckVkSuccess(device->fn.CreateDescriptorSetLayout(device->GetVkDevice(), &createInfo,
                                                            nullptr, &*specialized),
                       "CreateDescriptorSetLayout"));

    mSpecializations.insert({specialization, specialized}); // [1]
    return specialized;
}

This unsynchronized insert operation can intermittently trigger an internal target container reallocation rehash, which drops the backing nodes. If the worker thread performs mSpecializations.find() at the same time and attempts to dereference the iterator it->second [2], a data race ensues, leading to heap-use-after-free.

[0] https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/src/dawn/native/vulkan/BindGroupLayoutVk.cpp;drc=35a1c65f9e2f12819540d824d414ae0109bb1b10;l=263

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/src/dawn/native/vulkan/BindGroupLayoutVk.cpp;drc=35a1c65f9e2f12819540d824d414ae0109bb1b10;l=285

[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/src/dawn/native/vulkan/BindGroupLayoutVk.cpp;drc=35a1c65f9e2f12819540d824d414ae0109bb1b10;l=264

BISECTION

Introduced by Dawn upstream commit [0] which added runtime specialization of pipelines and the absl::flat_hash_map caching mechanism without mutex protection.

This regression was rolled into Chromium in commit [1].

[0] https://dawn.googlesource.com/dawn/+/66c4d93dc91932933c4bd66ff6afba1562d51259 ([YUV AHB] Add runtime specialization of pipelines)

[1] https://chromium.googlesource.com/chromium/src/+/5ba6a05e0af48d7b5a38703d0844fea105c5e1fc (Roll Dawn from b263aff3bd77 to 7ae353ac9aa9 (5 revisions))

VERSION

Chrome Version: HEAD

Operating System: Linux

REPRODUCTION CASE

poc.patch is a simple patch that introduces a 50ms artificial sleep in the GPU process to widen the data race window, ensuring the race is won reliably.

  1. Apply poc.patch, then build Chromium with ASan.
  2. Host the poc.html on an HTTP server.
  3. Run Chrome against the PoC.
Bash
$ python3 -m http.server
$ ./out/asan/chrome --enable-dawn-features=vulkan_force_static_samplers_for_external_textures "http://localhost:8000/poc.html"

CRASH INFORMATION

Type of crash: GPU process

Crash log: see the attached asan.txt ASan trace.

CREDIT INFORMATION

Reporter credit: Anonymous

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

This report describes a use after free in Dawn, the WebGPU implementation used by Chromium. The affected feature is asynchronous compute pipeline compilation through the createComputePipelineAsync API. When a page calls this API, Dawn can initialise the pipeline in the backend on background worker threads spawned in ThreadPoolForeg, rather than doing all of the work on the main GPU thread.

During backend layout construction, BindGroupLayout keeps an absl::flat_hash_map called mSpecializations. This map caches and specialises Vulkan descriptor sets and layouts based on ExternalTexture parameters. The report is an advisory from the Chrome VRP program, credited to an anonymous researcher, with a critical severity rating and a bounty of 11000.00 USD. It was disclosed on 2026-05-27. The report does not give a CVSS score.

Setup

The report states the following preconditions and tools:

  • Target: Chrome, version HEAD.
  • Operating system: Linux.
  • Build: Chromium built with ASan.
  • A reproduction patch, poc.patch, which adds a 50ms artificial sleep in the GPU process to widen the data race window so that the race is won reliably.
  • A reproduction page, poc.html, served over HTTP.
  • A Chrome flag, --enable-dawn-features=vulkan_force_static_samplers_for_external_textures, used when launching the browser.

The report does not describe any accounts, roles or authentication. The only actor involved is a page running in the browser.

Finding it

The researcher looked at how BindGroupLayout::GetOrCreateSpecializedHandle handles the mSpecializations map. In that function, the asynchronous background thread calls find to look up an existing layout for the given specialization (marked [0] in the report). The report states that there is no synchronisation or mutex protecting concurrent accesses to this absl::flat_hash_map.

At the same time, front-end JavaScript can trigger operations on the main GPU thread, such as executing queue.submit with alternating ExternalTexture bindings, to continuously incur cache misses on newly allocated combinations. Because of these intentional cache misses, GetOrCreateSpecializedHandle also executes on the main GPU thread and frequently inserts new items into the same hash map (marked [1]).

The relevant code, as quoted in the report, is:

C++
ResultOrError<VkDescriptorSetLayout> BindGroupLayout::GetOrCreateSpecializedHandle(
    const Specialization& specialization) {
    if (auto it = mSpecializations.find(specialization); it != mSpecializations.end()) { // [0]
        return it->second; // [2]
    }

// ...

    VkDescriptorSetLayout specialized;
    DAWN_TRY(
        CheckVkSuccess(device->fn.CreateDescriptorSetLayout(device->GetVkDevice(), &createInfo,
                                                            nullptr, &*specialized),
                       "CreateDescriptorSetLayout"));

    mSpecializations.insert({specialization, specialized}); // [1]
    return specialized;
}

The three annotated lines are:

  1. [0]: the find call on the map, performed by the background thread.
  2. [1]: the insert call on the same map, performed on the main GPU thread.
  3. [2]: the dereference of the iterator returned by find.

The report links each of these to the Chromium source at a specific revision:

  • [0] and [2]: third_party/dawn/src/dawn/native/vulkan/BindGroupLayoutVk.cpp, lines 263 and 264 respectively, at revision [redacted].
  • [1]: the same file, line 285, at the same revision.

What looked wrong was the combination of an unsynchronised read on a worker thread and an unsynchronised write on the main GPU thread against the same hash map. The report explains the consequence: the unsynchronised insert can intermittently trigger an internal target container reallocation, a rehash, which drops the backing nodes. If the worker thread performs mSpecializations.find() at the same time and then attempts to dereference the iterator with it->second at [2], a data race ensues, leading to a heap use after free.

Exploitation

The report does not present a request and response sequence. It presents a reproduction procedure. The steps are as follows.

Step 1: Apply the patch and build with ASan

poc.patch is described as a simple patch that introduces a 50ms artificial sleep in the GPU process to widen the data race window, ensuring the race is won reliably. The report does not include the contents of poc.patch. Chromium is then built with ASan.

Step 2: Serve the page

The poc.html page is hosted on an HTTP server. The report does not include the contents of poc.html. The report does not include the contents of poc.html or describe what it does.

Step 3: Run Chrome against the PoC

The commands given in the report are:

Bash
$ python3 -m http.server
$ ./out/asan/chrome --enable-dawn-features=vulkan_force_static_samplers_for_external_textures "http://localhost:8000/poc.html"

The first command starts a simple HTTP server in the current directory, which serves poc.html. The second command launches the ASan build of Chrome from out/asan/chrome, enables the Dawn feature vulkan_force_static_samplers_for_external_textures, and opens the PoC page from the local server.

Result

The type of crash is a GPU process crash. The crash log is the attached asan.txt ASan trace. The report does not reproduce the contents of asan.txt.

Root cause

The root cause is a data race on mSpecializations, an absl::flat_hash_map inside BindGroupLayout. The map is read with find from a background worker thread created for asynchronous compute pipeline compilation, and it is written with insert from the main GPU thread. No mutex or other synchronisation protects either access.

When insert causes the map to reallocate its backing storage, existing nodes are dropped. A concurrent find on the worker thread can return an iterator into the old storage, and the subsequent it->second dereference at [2] then reads freed memory. That is the heap use after free.

The report attributes the regression to a Dawn upstream commit, [redacted], titled [YUV AHB] Add runtime specialization of pipelines, which added runtime specialisation of pipelines and the absl::flat_hash_map caching mechanism without mutex protection. That change was rolled into Chromium in commit [redacted], described as Roll Dawn from b263aff3bd77 to 7ae353ac9aa9 (5 revisions).

Impact

The report classifies the issue as a use after free, and the crash type is a GPU process crash. The crash type is a GPU process crash. The report does not discuss what an attacker could achieve beyond triggering the memory error. It also does not state which users or configurations are affected.

The conditions required, as described, are that a page can drive createComputePipelineAsync and queue.submit with alternating ExternalTexture bindings so that the main GPU thread keeps inserting new specialisations while the background thread performs lookups. In the reproduction, the race window is widened by the 50ms sleep added by poc.patch, which the report says ensures the race is won reliably.

Fix

It identifies the missing synchronisation around mSpecializations as the cause, but does not state what change, if any, was made.

Variants to test

  1. Other caches reached from asynchronous pipeline compilation. Look for maps or containers that are read on ThreadPoolForeg worker threads and written on the main GPU thread. A positive result is an ASan heap use after free report, or a crash in the GPU process, when the page alternates inputs that force cache misses.
  2. Other asynchronous APIs in Dawn. Try createComputePipelineAsync and any other asynchronous creation paths with inputs that vary per call, so that the backend keeps inserting new entries. A positive result is a crash or ASan trace pointing at a container reallocation racing with a lookup.
  3. ExternalTexture specialisation combinations. Vary the ExternalTexture parameters so that new specialisations are allocated continuously. A positive result is the same use after free at the it->second dereference.
  4. Widening the race window. Apply a sleep or delay in the GPU process, as the report does with a 50ms sleep, to check whether a suspected race is real. A positive result is a crash that does not appear without the delay.
  5. Feature flags. Test with --enable-dawn-features=vulkan_force_static_samplers_for_external_textures and related Dawn features that change how external textures are handled. A positive result is a crash path that depends on the flag being enabled.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 18 min read.

What happened, in plain words

A security researcher found a bug in Google Chrome, the web browser. The bug lives in a part of Chrome called Dawn, which is the piece of software that lets web pages use the graphics card (the chip that draws images and runs certain kinds of calculations). The bug is a memory safety problem: under the right timing, Chrome can read a piece of memory that has already been thrown away, which can crash the part of the browser that talks to the graphics card. This kind of bug is called a use after free.

The report is an advisory from the Chrome VRP program. VRP stands for Vulnerability Reward Program: a scheme where Google pays people who find and report security bugs. The researcher is listed as Anonymous, the severity is rated critical, and the bounty was 11000.00 USD. It was disclosed on 2026-05-27. The report does not give a CVSS score (CVSS is a standard scoring system for the severity of a vulnerability; the report simply does not include one).

The rest of this article walks through the technical write-up step by step, explaining each concept from scratch.

Context

What Dawn and WebGPU are

WebGPU is a feature that lets a web page ask the browser to use the graphics card for heavy computation and drawing. Think of it as a waiter taking an order from the page and carrying it to the kitchen (the graphics card). Dawn is the specific implementation of that waiter inside Chromium, the open source project that Chrome is built from.

The affected feature is asynchronous compute pipeline compilation through the createComputePipelineAsync API. Let us unpack that phrase:

  • An API (Application Programming Interface) is a defined set of commands that one piece of software can send to another. A light switch is a good everyday comparison: you do not need to know how the wiring works, you just use the agreed interface (the switch) to turn the light on.
  • A compute pipeline is a prepared set of instructions for the graphics card, like a recipe that has been assembled and is ready to cook.
  • Compilation is the process of turning that recipe into something the graphics card can actually execute.
  • Asynchronous means the work does not block everything else. Instead of standing in the kitchen until the meal is ready, the browser hands the job to a helper and carries on. When the page calls this API, Dawn can initialise the pipeline in the backend on background worker threads spawned in ThreadPoolForeg, rather than doing all of the work on the main GPU thread.

A thread is an independent line of execution inside a program, like a separate worker in the same office. ThreadPoolForeg is the name of the pool of background workers that Dawn uses for this kind of job. The main GPU thread is the main line of execution that handles graphics commands coming from the page.

The cache and the map

During backend layout construction, BindGroupLayout keeps an absl::flat_hash_map called mSpecializations. This map caches and specialises Vulkan descriptor sets and layouts based on ExternalTexture parameters.

That sentence is dense, so here is each piece:

  • A cache is a store of things that were expensive to make, kept so they can be reused quickly. A kitchen shelf of pre-made sauces is a cache.
  • A map (also called a dictionary or hash map) is a data structure that stores pairs: a key and a value. You give it a key, it gives you back the matching value, like a phone book where the name is the key and the number is the value.
  • absl::flat_hash_map is a specific implementation of a map from a Google library called Abseil. The flat_hash_map part matters later, because of how it stores its contents in memory.
  • Vulkan is a graphics API, a lower level interface to the graphics card. Dawn translates WebGPU requests into Vulkan operations.
  • A descriptor set and a descriptor set layout are Vulkan's way of describing which resources (textures, buffers) a graphics operation will use, and how they are arranged. Think of a layout as a seating plan and a descriptor set as the actual list of guests sitting in those seats.
  • An ExternalTexture is a texture (an image stored in graphics memory) that comes from outside WebGPU, for example a video frame. Different parameters of an external texture can require different specialised layouts, which is why the map exists: to remember which specialisation was already built.

The report metadata

The report is an advisory from the Chrome VRP program, credited to an anonymous researcher, with a critical severity rating and a bounty of 11000.00 USD. It was disclosed on 2026-05-27. The report does not give a CVSS score.

Setup

The report states the following preconditions and tools:

  • Target: Chrome, version HEAD. HEAD means the very latest development version of the source code, the tip of the tree, not a numbered release.
  • Operating system: Linux.
  • Build: Chromium built with ASan. ASan (AddressSanitizer) is a debugging tool added when compiling a program. It watches memory accesses and loudly reports mistakes such as reading memory that has already been freed. It is like fitting a smoke alarm while testing a building.
  • A reproduction patch, poc.patch, which adds a 50ms artificial sleep in the GPU process to widen the data race window so that the race is won reliably. A patch is a small change applied to source code before building. A PoC (proof of concept) is a minimal example that demonstrates the bug. A race is explained below; the sleep simply makes the timing easier to hit.
  • A reproduction page, poc.html, served over HTTP. HTTP is the protocol browsers use to fetch web pages from a server.
  • A Chrome flag, --enable-dawn-features=vulkan_force_static_samplers_for_external_textures, used when launching the browser. A flag (or switch) is a command line option that changes how a program behaves when it starts.

The only actor involved is a page running in the browser.

Finding it

The two threads and the shared map

The researcher looked at how BindGroupLayout::GetOrCreateSpecializedHandle handles the mSpecializations map. The function name says what it does: get an existing specialised handle, or create one if it does not exist yet.

In that function, the asynchronous background thread calls find to look up an existing layout for the given specialization (marked [0] in the report). find is the map operation that searches for a key and returns a pointer to the matching entry, called an iterator.

The report states that there is no synchronisation or mutex protecting concurrent accesses to this absl::flat_hash_map. A mutex is a lock that lets only one thread use a shared resource at a time, like a key to a single toilet: whoever holds the key goes in, everyone else waits. Synchronisation is the general idea of coordinating threads so they do not step on each other. Here there is none, so two threads can touch the same map at the same time.

At the same time, front-end JavaScript can trigger operations on the main GPU thread, such as executing queue.submit with alternating ExternalTexture bindings, to continuously incur cache misses on newly allocated combinations. JavaScript is the programming language of web pages. queue.submit is the WebGPU command that hands a batch of work to the graphics card. A cache miss is when the thing you want is not in the cache, so it has to be built and stored. By alternating the external texture bindings, the page keeps asking for combinations that are not yet in the map, so the cache keeps missing on purpose.

Because of these intentional cache misses, GetOrCreateSpecializedHandle also executes on the main GPU thread and frequently inserts new items into the same hash map (marked [1]). So now we have the setup for a race: one thread reading the map, another thread writing to it, with no lock in between.

The code

The relevant code, as quoted in the report, is:

C++
ResultOrError<VkDescriptorSetLayout> BindGroupLayout::GetOrCreateSpecializedHandle(
    const Specialization& specialization) {
    if (auto it = mSpecializations.find(specialization); it != mSpecializations.end()) { // [0]
        return it->second; // [2]
    }

// ...

    VkDescriptorSetLayout specialized;
    DAWN_TRY(
        CheckVkSuccess(device->fn.CreateDescriptorSetLayout(device->GetVkDevice(), &createInfo,
                                                            nullptr, &*specialized),
                       "CreateDescriptorSetLayout"));

    mSpecializations.insert({specialization, specialized}); // [1]
    return specialized;
}

Line by line, in plain words:

  1. ResultOrError<VkDescriptorSetLayout> BindGroupLayout::GetOrCreateSpecializedHandle( starts the definition of a function that returns either a Vulkan descriptor set layout or an error. ResultOrError is a type that can hold one or the other.
  2. const Specialization& specialization) { declares the input: a specialisation description, passed by reference (so it is not copied).
  3. if (auto it = mSpecializations.find(specialization); it != mSpecializations.end()) { // [0] searches the map for the given specialisation and stores the result in it. If it is not the special end marker (end()), the key was found. This is the read, marked [0].
  4. return it->second; // [2] returns the value stored under that key. it->second means the second part of the key and value pair, that is, the value. This is the dereference, marked [2].
  5. // ... is an elision: the report leaves out code in the middle.
  6. VkDescriptorSetLayout specialized; declares a variable to hold the newly created layout.
  7. DAWN_TRY( begins a macro that runs the following call and returns early if it fails. A macro is a piece of code that the compiler expands in place.
  8. CheckVkSuccess(device->fn.CreateDescriptorSetLayout(device->GetVkDevice(), &createInfo, calls Vulkan's function to create a descriptor set layout, wrapping it in a success check.
  9. nullptr, &*specialized), passes the remaining arguments, including a pointer to where the result should be stored.
  10. "CreateDescriptorSetLayout")); supplies a label used in error messages and closes the macro call.
  11. mSpecializations.insert({specialization, specialized}); // [1] stores the new key and value pair in the map. This is the write, marked [1].
  12. return specialized; returns the newly created layout.
  13. } closes the function.

The three annotated lines are:

  1. [0]: the find call on the map, performed by the background thread.
  2. [1]: the insert call on the same map, performed on the main GPU thread.
  3. [2]: the dereference of the iterator returned by find.

The report links each of these to the Chromium source at a specific revision:

  • [0] and [2]: third_party/dawn/src/dawn/native/vulkan/BindGroupLayoutVk.cpp, lines 263 and 264 respectively, at revision [redacted].
  • [1]: the same file, line 285, at the same revision.

A revision here is a specific snapshot of the source code, identified by a long hexadecimal string, so anyone can look at exactly the same code the researcher saw.

Why it is a bug

What looked wrong was the combination of an unsynchronised read on a worker thread and an unsynchronised write on the main GPU thread against the same hash map. The report explains the consequence: the unsynchronised insert can intermittently trigger an internal target container reallocation, a rehash, which drops the backing nodes. If the worker thread performs mSpecializations.find() at the same time and then attempts to dereference the iterator with it->second at [2], a data race ensues, leading to a heap use after free.

Let us unpack that:

  • A data race is when two threads access the same memory at the same time and at least one of them writes, with no coordination. The result depends on timing, which is why the bug is intermittent.
  • A rehash or reallocation is what a hash map does when it runs out of room: it builds a bigger internal storage area and moves the entries into it. The old storage is then freed. In everyday terms, imagine a filing cabinet that is full, so you buy a bigger cabinet, move every folder across, and throw the old cabinet away.
  • The backing nodes are the individual entries in that storage. When the old storage is dropped, those nodes are freed.
  • An iterator is a pointer-like handle to an entry in the map. If the map moves its entries, an iterator obtained before the move points at the old, now freed, location.
  • Heap is the area of memory a program uses for data that is created while it runs, as opposed to fixed-size memory reserved up front. Use after free means the program keeps using a piece of heap memory after it has been released. It is like reading a page from a notebook that has already been shredded: the information may still look like it is there, but it is no longer yours and may be overwritten at any moment.

So the sequence is: the worker thread finds an entry and holds a handle to it; the main thread inserts a new entry, the map grows, the old storage is freed; the worker thread then reads through its now stale handle. That read touches freed memory.

Exploitation

The report does not present a request and response sequence. It presents a reproduction procedure. The steps are as follows.

Step 1: Apply the patch and build with ASan

poc.patch is described as a simple patch that introduces a 50ms artificial sleep in the GPU process to widen the data race window, ensuring the race is won reliably. The report does not include the contents of poc.patch. Chromium is then built with ASan.

Why this step: races depend on timing. If the two threads almost never overlap in the right way, the bug will not show up during a test. Adding a deliberate pause makes the overlap much more likely, so the test is repeatable. Building with ASan means that when the bad memory access happens, the tool reports it clearly instead of the program silently carrying on.

Step 2: Serve the page

The poc.html page is hosted on an HTTP server. The report does not include the contents of poc.html. The report does not include the contents of poc.html or describe what it does.

Why this step: a web page has to be delivered to the browser by something. A local HTTP server is the simplest way to do that without involving the internet.

Step 3: Run Chrome against the PoC

The commands given in the report are:

Bash
$ python3 -m http.server
$ ./out/asan/chrome --enable-dawn-features=vulkan_force_static_samplers_for_external_textures "http://localhost:8000/poc.html"

Line by line:

  1. $ python3 -m http.server starts a small web server using Python 3. The $ is the shell prompt, not part of the command. It serves the files in the current directory.
  2. $ ./out/asan/chrome launches the Chrome binary that was built with ASan, located at that path inside the build output directory.
  3. --enable-dawn-features=vulkan_force_static_samplers_for_external_textures turns on a specific Dawn feature related to how external textures are handled.
  4. "http://localhost:8000/poc.html" tells Chrome to open the PoC page from the local server. localhost means this same machine, and 8000 is the port the Python server is listening on.

The first command starts a simple HTTP server in the current directory, which serves poc.html. The second command launches the ASan build of Chrome from out/asan/chrome, enables the Dawn feature vulkan_force_static_samplers_for_external_textures, and opens the PoC page from the local server.

Result

The type of crash is a GPU process crash. Modern browsers split their work into separate processes for isolation; the GPU process is the one that talks to the graphics card. If it crashes, graphics work in the browser stops. The crash log is the attached asan.txt ASan trace. The report does not reproduce the contents of asan.txt.

Root cause

The root cause is a data race on mSpecializations, an absl::flat_hash_map inside BindGroupLayout. The map is read with find from a background worker thread created for asynchronous compute pipeline compilation, and it is written with insert from the main GPU thread. No mutex or other synchronisation protects either access.

When insert causes the map to reallocate its backing storage, existing nodes are dropped. A concurrent find on the worker thread can return an iterator into the old storage, and the subsequent it->second dereference at [2] then reads freed memory. That is the heap use after free.

The report attributes the regression to a Dawn upstream commit, [redacted], titled [YUV AHB] Add runtime specialization of pipelines, which added runtime specialisation of pipelines and the absl::flat_hash_map caching mechanism without mutex protection. That change was rolled into Chromium in commit [redacted], described as Roll Dawn from b263aff3bd77 to 7ae353ac9aa9 (5 revisions).

A commit is a recorded change to a codebase. Upstream means the original project where the code is developed, here Dawn, before it is copied into Chromium. A regression is a bug that was introduced by a change that used to work correctly. A roll is the routine act of copying the latest Dawn code into Chromium. YUV AHB refers to a video colour format and an Android buffer mechanism; the report only gives it as part of the commit title.

The absence of a lock around the map is the defect itself.

Impact

The report classifies the issue as a use after free, and the crash type is a GPU process crash. The crash type is a GPU process crash. The report does not discuss what an attacker could achieve beyond triggering the memory error. It also does not state which users or configurations are affected.

In plain terms: the report proves that a web page can make the browser's graphics process touch freed memory and crash. Whether that can be turned into something worse is not answered by this report.

The conditions required, as described, are that a page can drive createComputePipelineAsync and queue.submit with alternating ExternalTexture bindings so that the main GPU thread keeps inserting new specialisations while the background thread performs lookups. In the reproduction, the race window is widened by the 50ms sleep added by poc.patch, which the report says ensures the race is won reliably.

Fix

It identifies the missing synchronisation around mSpecializations as the cause, but does not state what change, if any, was made.

Variants to test

They are written for someone already familiar with the code, so here is what each one means.

  1. Other caches reached from asynchronous pipeline compilation. Look for maps or containers that are read on ThreadPoolForeg worker threads and written on the main GPU thread. A positive result is an ASan heap use after free report, or a crash in the GPU process, when the page alternates inputs that force cache misses. In other words: the same pattern of one thread reading and another writing without a lock may exist elsewhere.
  2. Other asynchronous APIs in Dawn. Try createComputePipelineAsync and any other asynchronous creation paths with inputs that vary per call, so that the backend keeps inserting new entries. A positive result is a crash or ASan trace pointing at a container reallocation racing with a lookup.
  3. ExternalTexture specialisation combinations. Vary the ExternalTexture parameters so that new specialisations are allocated continuously. A positive result is the same use after free at the it->second dereference.
  4. Widening the race window. Apply a sleep or delay in the GPU process, as the report does with a 50ms sleep, to check whether a suspected race is real. A positive result is a crash that does not appear without the delay.
  5. Feature flags. Test with --enable-dawn-features=vulkan_force_static_samplers_for_external_textures and related Dawn features that change how external textures are handled. A positive result is a crash path that depends on the flag being enabled.

Glossary

  • API: a defined set of commands one piece of software uses to talk to another, like a light switch that hides the wiring.
  • ASan (AddressSanitizer): a debugging tool added at compile time that detects memory errors such as use after free.
  • Asynchronous: work that is handed off and runs in the background instead of blocking the caller.
  • Backing nodes: the individual entries stored inside a hash map's internal memory.
  • Bounty: a payment made to a researcher for reporting a valid security bug.
  • Cache: a store of previously built results kept for fast reuse.
  • Cache miss: when the requested item is not in the cache and must be built and stored.
  • Commit: a recorded change to a codebase.
  • Compute pipeline: a prepared set of instructions for the graphics card to execute.
  • Compilation: turning source instructions into something the machine can run.
  • Critical: the highest severity rating used in this report.
  • CVSS: a standard scoring system for vulnerability severity; the report gives no score.
  • Data race: two threads accessing the same memory at the same time with at least one write and no coordination.
  • Dawn: Chromium's implementation of WebGPU, which translates web requests into graphics card operations.
  • Descriptor set / descriptor set layout: Vulkan's description of which resources an operation uses and how they are arranged.
  • ExternalTexture: a texture that comes from outside WebGPU, such as a video frame.
  • Flag (switch): a command line option that changes how a program starts.
  • GPU process: the separate browser process that communicates with the graphics card.
  • Hash map: a data structure storing key and value pairs with fast lookup by key.
  • HEAD: the latest development version of a source code tree.
  • Heap: the area of memory used for data created while a program runs.
  • HTTP: the protocol browsers use to fetch pages from servers.
  • Iterator: a pointer-like handle to an entry in a container such as a map.
  • JavaScript: the programming language of web pages.
  • Macro: a piece of code the compiler expands in place.
  • Main GPU thread: the main line of execution handling graphics commands from the page.
  • Map: a data structure storing key and value pairs, also called a dictionary.
  • Mutex: a lock allowing only one thread at a time to use a shared resource.
  • Patch: a small change applied to source code before building.
  • PoC (proof of concept): a minimal example that demonstrates a bug.
  • Reallocation: building new internal storage and moving entries into it, then freeing the old storage.
  • Regression: a bug introduced by a change that previously worked correctly.
  • Rehash: a hash map rebuilding its internal storage, usually when it grows.
  • Revision: a specific snapshot of source code identified by a long hexadecimal string.
  • Roll: copying the latest code from an upstream project into another project.
  • Severity: a rating of how serious a vulnerability is.
  • Synchronisation: coordinating threads so they do not access shared data at the same time.
  • Thread: an independent line of execution inside a program.
  • ThreadPoolForeg: the pool of background worker threads Dawn uses for asynchronous work.
  • Upstream: the original project where code is developed before being copied elsewhere.
  • Use after free: using memory after it has been released, which can crash a program or worse.
  • Vulkan: a low level graphics API that Dawn translates WebGPU requests into.
  • VRP (Vulnerability Reward Program): a scheme that pays researchers for reporting security bugs.
  • WebGPU: a web feature that lets pages use the graphics card for computation and drawing.
  • YUV AHB: a video colour format and an Android buffer mechanism, mentioned only in a commit title.

More by Anonymous

View all

2,270 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.