Use after free in Chromoting (CVE-2026-13830)
A use-after-free exists in the Chrome Remote Desktop host on Linux because a raw pointer to the client object is passed to asynchronous D-Bus callbacks. If the object is destroyed while a request is pending, the callback dereferences freed memory, which could allow an authenticated remote attacker to execute native code.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 46 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 Use-After-Free vulnerability exists in GnomeDisplayConfigDBusClient due to passing a raw pointer to asynchronous GLib D-Bus callbacks. If the object is destroyed while a D-Bus request is pending, the callback dereferences a dangling pointer during execution. This impacts the Chrome Remote Desktop host on Linux when running in a GNOME environment.
Affected files:
remoting/host/linux/gnome_display_config_dbus_client.ccremoting/host/linux/gnome_display_config_dbus_client.h
Estimated timestamp from git blame: 2023-11-29
Summary
A potential cross-thread Use-After-Free (UAF) vulnerability has been identified in the GnomeDisplayConfigDBusClient class within the Chrome Remote Desktop host for Linux. The issue stems from passing a raw this pointer as user_data to GLib asynchronous D-Bus operations. Since GLib guarantees that asynchronous callbacks will be invoked exactly once even upon cancellation, the callback may execute after the GnomeDisplayConfigDBusClient object has been destroyed, leading to a dereference of a dangling pointer.
Root Cause
In remoting/host/linux/gnome_display_config_dbus_client.cc, the class uses g_dbus_connection_call() and g_bus_get() for asynchronous D-Bus operations. These functions take a gpointer user_data argument, which is populated with a raw this pointer (lines 70, 102, 210).
The class destructor calls g_cancellable_cancel() on its GCancellable member (line 61). However, per the GIO library documentation, the registered GAsyncReadyCallback is always invoked exactly once, even if the operation is cancelled. In the event of cancellation, the callback receives a G_IO_ERROR_CANCELLED error.
The static callback methods, such as OnDisplayConfigCurrentStateReply (line 159), cast user_data back to GnomeDisplayConfigDBusClient*. Even when the operation fails or is cancelled (resulting in a null config variant), the code attempts to dereference this pointer to access caller_task_runner_ or weak_ptr_ (lines 173-177):
if (!config) {
LOG(ERROR) << "Failed to get current display configuration: "
<< error->message;
that->caller_task_runner_->PostTask(
FROM_HERE,
base::BindOnce(
&GnomeDisplayConfigDBusClient::OnDisplayConfigCurrentStateError,
that->weak_ptr_));
return;
}
If the GnomeDisplayConfigDBusClient instance was destroyed shortly before this callback fires (e.g., during session disconnection), that points to freed memory, resulting in a UAF.
Potential Impact and Exploitation
This vulnerability occurs in the remoting_me2me_host (specifically the desktop process), which on Linux is an unsandboxed process running with the privileges of the logged-in user. A successful exploit could allow an authenticated remote attacker to achieve native code execution by grooming the heap and controlling the state of the freed object, particularly the TaskRunner virtual table.
Suggested Reproduction Steps
Note: These are potential steps as a functional PoC has not been executed.
- Establish a Chrome Remote Desktop session on a Linux host running GNOME.
- Trigger a display resolution change from the client to initiate a D-Bus request (
GetCurrentState) to Mutter. - Disconnect the CRD session while the D-Bus response is in flight.
- Observe the crash in the desktop process when the GLib event loop attempts to execute the
OnDisplayConfigCurrentStateReplycallback.
Recommended Fix
Avoid passing raw this pointers as user_data to GLib callbacks. Instead, use a lifetime-managed context object or a wrapper that integrates with base::WeakPtr. Alternatively, the callback should check for cancellation and avoid dereferencing user_data if the operation was cancelled, although a more robust solution would involve managing the lifetime of the user_data itself.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
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
The code passes a raw this pointer as user_data to GLib asynchronous D-Bus calls, but GLib always invokes the callback even after cancellation, so the callback can dereference a destroyed object.
Impact
A successful exploit could allow an authenticated remote attacker to achieve native code execution in the unsandboxed desktop process, though no functional proof of concept has been executed.
What the attacker needed
Chrome Remote Desktop host on Linux with GNOME; Authenticated remote session; Trigger display resolution change; Disconnect during pending D-Bus request
The fix
The code should avoid passing raw this pointers as user_data to GLib callbacks and instead use a lifetime-managed context or wrapper integrated with base::WeakPtr.
How it was found
- Establish a Chrome Remote Desktop session on a Linux host running GNOME.
- Trigger a display resolution change from the client to initiate a D-Bus request to Mutter.
- Disconnect the CRD session while the D-Bus response is in flight.
- Observe the crash in the desktop process when the GLib event loop executes the callback.
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 happens when a program keeps using a piece of memory after it has been freed. Here, a background task (a D-Bus callback) can run after the object that started it is gone, so it reads or writes memory that no longer belongs to it. An attacker who can trigger that timing might take control of the program.
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.