Use after free in Compositing (CVE-2026-11639)
A potential data race exists in DisplayLinkMacMojo on macOS where the Browser UI thread mutates member variables concurrently with the VSync thread without synchronisation. An attacker could potentially trigger a use-after-free by causing the GPU process to crash while VSync callbacks are active.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 13 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 concurrency data race exists in DisplayLinkMacMojo on macOS. When the GPU process is lost, OnGpuProcessLost is executed on the Browser UI thread and mutates member variables that are concurrently accessed by the VSync thread without adequate synchronization.
Affected files:
ui/compositor/display_link_mac_mojo.mmui/compositor/display_link_mac_mojo.h
Estimated timestamp from git blame: 2025-12-17
Description
A potential thread-safety issue has been identified in ui::DisplayLinkMacMojo on macOS (enabled via the kCADisplayLinkInBrowser feature flag). The class manages macOS CADisplayLink callbacks and coordinates VSync IPC between the GPU process and the Browser process.
Several member variables are accessed and mutated concurrently across two different threads without synchronization primitives (such as locks) or enforcement of a single sequence:
- Browser UI Thread: Runs
OnGpuProcessLostwhen a GPU process crash is detected. - VSync Thread (
base::Thread): Runs CADisplayLink callbacks (OnDisplayLinkVSyncCallback) and handles incoming IPC calls (NeedsBeginFrameWithId).
Potential Vulnerability Mechanism
1. Unsynchronized Map Mutations
In ui/compositor/display_link_mac_mojo.mm, OnGpuProcessLost runs on the Browser UI thread and performs the following moves:
if (!vsync_callbacks_.empty()) {
task_runner()->PostTask(
FROM_HERE, base::DoNothingWithBoundArgs(std::move(vsync_callbacks_)));
}
if (!display_links_.empty()) {
task_runner()->PostTask(
FROM_HERE, base::DoNothingWithBoundArgs(std::move(display_links_)));
}
Concurrently, the VSync thread executes NeedsBeginFrameWithId and CADisplayLink callbacks, which read and write to display_links_ and vsync_callbacks_:
auto found = display_links_.find(display_id);
...
vsync_callbacks_[display_id] = std::move(vsync_callback);
Because std::map is not thread-safe, concurrent reads/writes and moves can lead to undefined behavior, including memory corruption of allocator-owned map nodes.
2. Unsynchronized Mojo Remote Operations
Similarly, OnGpuProcessLost moves external_begin_frame_controller_ on the Browser UI thread:
if (external_begin_frame_controller_) {
task_runner()->PostTask(FROM_HERE, base::DoNothingWithBoundArgs(std::move(
external_begin_frame_controller_)));
}
And then re-initializes it via ConnectVSyncIpc on the Browser UI thread. Concurrently, OnDisplayLinkVSyncCallback on the VSync thread accesses this remote:
if (!external_begin_frame_controller_.is_bound()) {
return;
}
...
external_begin_frame_controller_->IssueExternalVSync(viz_params);
Because mojo::Remote is not thread-safe and is bound to the VSync thread sequence, modifying it from the UI thread violates sequence safety, potentially leading to a use-after-free (UAF) of the underlying Mojo routing and endpoint objects.
Potential Steps to Reproduce
Note: These are potential steps based on static analysis; our tooling does not currently run dynamic proof-of-concept tests.
- Establish a regular VSync registration from the GPU process to trigger continuous
OnDisplayLinkVSyncCallbackcalls at 60Hz-120Hz on the Browser's VSync thread. - Cause the GPU process to terminate or crash, triggering
OnGpuProcessLoston the Browser UI thread. - The Browser UI thread immediately attempts to tear down and recreate the Mojo remotes and internal maps while CADisplayLink callbacks continue to fire on the VSync thread, triggering the race condition.
Suggested Fix
To resolve this issue, ensure all state mutations and accesses to display_links_, vsync_callbacks_, external_begin_frame_controller_, and client_receiver_ are serialized on the VSync sequence.
Instead of mutating these members directly on the Browser UI thread in OnGpuProcessLost, post a task to the VSync thread's task runner to safely clean up, disconnect, and re-initialize the state on the correct sequence.
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
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.
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 lack of synchronisation when mutating shared member variables and Mojo remotes from the Browser UI thread while the VSync thread concurrently accesses them.
Impact
A use-after-free could occur, potentially leading to memory corruption, but the report notes this is based on static analysis and no dynamic proof-of-concept has been run.
What the attacker needed
MacOS with kCADisplayLinkInBrowser enabled; GPU process crash while VSync active
The fix
The fix should serialise all state mutations and accesses on the VSync sequence by posting a task to the VSync thread's task runner instead of mutating members directly on the Browser UI thread.
How it was found
- Establish a regular VSync registration from the GPU process to trigger continuous callbacks on the Browser's VSync thread.
- Cause the GPU process to terminate or crash, triggering OnGpuProcessLost on the Browser UI thread.
- The Browser UI thread tears down and recreates Mojo remotes and internal maps while CADisplayLink callbacks continue on the VSync thread, triggering the race.
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.
This report describes a race condition, which happens when two parts of a program try to use the same data at the same time without coordinating. Here, one thread cleans up after a crash while another thread is still using the same data, which can corrupt memory and potentially let an attacker run malicious code.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.