Use after free in Chromoting (CVE-2026-14121)
A per-session monitor in Chrome Remote Desktop's host process registers a callback with a process-lifetime singleton using a raw pointer and never unregisters it when the session ends. A later display change can invoke the dangling callback, causing a use-after-free that may crash the host or, the report suggests, allow code execution.
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 potential Use-after-free vulnerability exists in Chrome Remote Desktop's host process on Linux Wayland when using non-GNOME compositors. A session-scoped monitor registers a raw pointer callback with a process-lifetime singleton but fails to unregister it upon session termination. This leads to a dangling pointer invocation during subsequent display configuration changes.
Affected files:
remoting/host/delegating_desktop_display_info_monitor.ccremoting/host/polling_desktop_display_info_monitor.ccremoting/host/linux/portal_interaction_strategy.ccremoting/host/linux/portal_remote_desktop_session.cc
Estimated timestamp from git blame: 2025-11-03
Summary
A potential Use-after-free (UAF) vulnerability has been identified in the remoting_host process on Linux systems running Wayland with non-GNOME compositors (e.g., KDE Plasma, Sway). The issue arises from a lifetime mismatch where a per-session DelegatingDesktopDisplayInfoMonitor registers a callback with a process-lifetime singleton using base::Unretained(this) and fails to unregister it when the session ends.
Root Cause Analysis
In remoting/host/delegating_desktop_display_info_monitor.cc, the Start() method registers a repeating callback to its own OnUnderlyingDisplayInfoChanged method using base::Unretained(this):
void DelegatingDesktopDisplayInfoMonitor::Start() {
// ...
underlying_->AddCallback(base::BindRepeating(
&DelegatingDesktopDisplayInfoMonitor::OnUnderlyingDisplayInfoChanged,
base::Unretained(this)));
// ...
}
The underlying_ monitor's AddCallback implementation (found in PollingDesktopDisplayInfoMonitor) uses callback_list_.AddUnsafe(), which does not return a subscription handle for unregistration:
void PollingDesktopDisplayInfoMonitor::AddCallback(base::RepeatingClosure callback) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
callback_list_.AddUnsafe(std::move(callback));
}
On Linux Wayland (non-GNOME), PortalInteractionStrategy creates a DelegatingDesktopDisplayInfoMonitor that wraps a PollingDesktopDisplayInfoMonitor owned by the PortalRemoteDesktopSession singleton. This singleton outlives the per-session monitor.
When a session is destroyed, the DelegatingDesktopDisplayInfoMonitor is freed, but the dangling Unretained pointer remains in the singleton's callback list. If a subsequent display information change occurs (triggered by a new session or the 100ms polling timer), the singleton invokes the dangling callback, resulting in a UAF.
Potential Impact
An attacker who can authenticate and connect to a Chrome Remote Desktop host on a vulnerable Linux Wayland configuration could potentially exploit this UAF to achieve arbitrary code execution. Since remoting_host is an unsandboxed process typically running with the privileges of the logged-in user, this could lead to full system compromise under that user's context.
Potential Steps to Reproduce
- Use a Linux machine running a Wayland compositor like KDE Plasma or Sway.
- Set up and connect to the machine via Chrome Remote Desktop.
- Disconnect the CRD session. This destroys the per-session
DelegatingDesktopDisplayInfoMonitorwhile leaving a dangling callback in thePortalRemoteDesktopSessionsingleton. - Trigger a display resolution change (e.g., by connecting a new session or via local OS settings).
- The
remoting_hostprocess may crash or exhibit undefined behavior as it attempts to execute the dangling callback.
Suggested Fix
The DelegatingDesktopDisplayInfoMonitor::Start() method should use a base::WeakPtr instead of base::Unretained(this) when binding the callback. Alternatively, the DesktopDisplayInfoMonitor interface should be updated to return a base::CallbackListSubscription from AddCallback, allowing implementations like DelegatingDesktopDisplayInfoMonitor to manage their registration lifetime correctly.
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 per-session monitor binds a callback with base::Unretained(this) into a process-lifetime singleton's callback list that offers no unregistration handle, so the pointer outlives the object.
Impact
An authenticated attacker connected to a vulnerable host could potentially exploit the use-after-free for arbitrary code execution in the unsandboxed host process, though the report only demonstrates a possible crash.
What the attacker needed
Linux with a non-GNOME Wayland compositor; Chrome Remote Desktop host installed; Attacker can authenticate to the host; A display change occurs after disconnect
The fix
The callback should be bound with a base::WeakPtr instead of base::Unretained(this), or the monitor interface should return a subscription that the per-session object can use to unregister.
How it was found
- Use a Linux machine with a Wayland compositor such as KDE Plasma or Sway.
- Set up and connect to the machine through Chrome Remote Desktop.
- Disconnect the session, destroying the per-session monitor but leaving the dangling callback.
- Trigger a display resolution change, for example by starting a new session or changing local OS settings.
- Observe the host process crash or behave unpredictably when the dangling callback runs.
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.
When a program frees an object but keeps a pointer to it, that pointer is 'dangling'. If something later uses it, the program reads or writes memory that may already belong to something else, which is called a use-after-free. Here a short-lived session object left such a pointer inside a long-lived object, so a later event could touch freed memory.
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.