Use after free in Chromoting (CVE-2026-10978)
A race condition in Chrome Remote Desktop's Windows touch injection logic allows unsynchronised access to shared state, potentially leading to a use-after-free or heap corruption during session teardown. An authenticated attacker could bypass event tracking to trigger this, possibly achieving arbitrary code execution with SYSTEM privileges.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 19 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 race condition in the Windows touch injection logic of Chrome Remote Desktop allows for unsynchronized access to shared state across different threads. By bypassing event tracking, an attacker can trigger a Use-After-Free or heap corruption during session teardown. This could potentially result in arbitrary code execution with SYSTEM privileges in the remoting_desktop.exe process.
Affected files:
remoting/host/touch_injector_win.ccremoting/host/input_injector_win.ccremoting/protocol/input_event_tracker.ccremoting/host/desktop_session_agent.cc
Estimated timestamp from git blame: 2023-07-20
Summary
A potential race condition exists in TouchInjectorWin because its internal state is accessed from both the UI thread and the Input thread without synchronization. In the Windows Desktop Process (remoting_desktop.exe), lifecycle methods for touch injection are executed on the UI thread, while input events and keep-alive timers are handled on the Input thread. This lack of thread affinity can lead to a Use-After-Free (UAF) on the injection delegate or heap corruption in the active touch points map during session disconnection.
Root Cause Analysis
In remoting/host/input_injector_win.cc, InputInjectorWin::Core manages a TouchInjectorWin instance. It dispatches tasks across two task runners:
- UI Thread (
ui_task_runner_): ExecutesStart()andStop(), which callTouchInjectorWin::Init()andTouchInjectorWin::Deinitialize()respectively. - Input Thread (
main_task_runner_): ExecutesInjectTouchEvent(), which callsTouchInjectorWin::InjectTouchEvent()and manages abase::RepeatingTimerfor keep-alive events.
TouchInjectorWin contains two critical members:
std::unique_ptr<TouchInjectorWinDelegate> delegate_std::map<uint32_t, POINTER_TOUCH_INFO> touches_in_contact_
When a session is stopped, the UI thread calls Deinitialize(), which performs the following (remoting/host/touch_injector_win.cc):
void TouchInjectorWin::Deinitialize() {
touches_in_contact_.clear();
delegate_ = TouchInjectorWinDelegate::Create();
// ...
keep_alive_timer_.Stop();
}
Simultaneously, the Input thread may be executing OnKeepAlive(), which iterates over touches_in_contact_ and calls a virtual method on delegate_:
bool TouchInjectorWin::InjectTouchInput(...) {
if (delegate_->InjectTouchInput(touches.size(), touches.data()) == 0)
// ...
}
Because delegate_ is a std::unique_ptr and is reset on the UI thread, the Input thread can dereference a dangling pointer during the virtual call dispatch. Additionally, base::Timer is not thread-safe and requires Stop() to be called on the same sequence it was started on, which is violated here.
Attacker-Controlled Trigger
An attacker can ensure the race condition is reachable by bypassing the InputEventTracker logic. Normally, DesktopSessionAgent::Stop() calls input_tracker_->ReleaseAll(), which should cancel all active touches. However, InputEventTracker only tracks touch IDs for TOUCH_POINT_START events.
Potential steps to trigger the vulnerability:
- An authenticated client sends a
TOUCH_POINT_MOVEevent containing a new, arbitrary touch ID. InputEventTracker::InjectTouchEventignores this event for ID tracking purposes, leaving its tracking set empty.TouchInjectorWin::MoveTouchPointsprocesses the event, inserts the new ID intotouches_in_contact_, and starts the 100ms keep-alive timer on the Input thread.- The client disconnects, triggering
DesktopSessionAgent::Stop()on the UI thread. - The tracker's
ReleaseAll()does nothing because it is unaware of the active touch ID, and the UI thread proceeds toDeinitialize(), racing against the active timer on the Input thread.
Impact
Successful exploitation could lead to arbitrary code execution in the context of the remoting_desktop.exe process. On Windows, this process often runs with SYSTEM privileges or at a High Integrity level with uiAccess="true". This represents a potential privilege escalation path from an authenticated user to SYSTEM.
Suggested Fix
To resolve this issue, ensure that all access to TouchInjectorWin is restricted to a single sequence. This can be achieved by:
- Moving the calls to
Init()andDeinitialize()from the UI thread to the Input thread withinInputInjectorWin::Core. - Adding a
base::SequenceCheckertoTouchInjectorWinto enforce thread affinity. - Updating
InputEventTrackerto track touch point IDs for all touch event types, ensuring that all active points are correctly released during teardown.
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
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 TouchInjectorWin object's state is accessed from both the UI thread and the Input thread without synchronisation, and the InputEventTracker fails to track touch IDs for move events, allowing a race during teardown.
Impact
Successful exploitation could lead to arbitrary code execution in the context of the remoting_desktop.exe process, potentially escalating from an authenticated user to SYSTEM.
What the attacker needed
Authenticated client; Windows host running Chrome Remote Desktop
The fix
The issue should be fixed by restricting all access to TouchInjectorWin to a single sequence, moving Init() and Deinitialize() to the Input thread, adding a SequenceChecker, and updating InputEventTracker to track all touch event types.
How it was found
- An authenticated client sends a TOUCH_POINT_MOVE event with a new touch ID.
- The InputEventTracker ignores this event for ID tracking, leaving its set empty.
- TouchInjectorWin processes the move, inserts the ID into touches_in_contact_, and starts a keep-alive timer on the Input thread.
- The client disconnects, triggering DesktopSessionAgent::Stop() on the UI thread.
- The tracker's ReleaseAll() does nothing because it is unaware of the active touch ID, and the UI thread proceeds to Deinitialize(), racing against the active timer on the Input thread.
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 timing bug in Chrome Remote Desktop. When a remote session ends, two parts of the program try to clean up at the same time, and one part can use memory that the other has already freed. An attacker who can connect to the service might exploit this to run their own code with high privileges.
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.