Use after free in Chromoting (CVE-2026-10893)
A log data class in the Chrome Remote Desktop host is read and written from two different threads without a lock, so a client requesting an RTC log transfer while logging is active can leave a dangling reference. An authenticated attacker could then cause a use-after-free write in the unsandboxed, high-privilege host process, potentially leading to code execution.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 20 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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A data race in WebrtcEventLogData allows concurrent unsynchronized access to a base::circular_deque from a ThreadPool worker and the CRD network thread. This can lead to a Use-After-Free (UAF) or heap corruption in the unsandboxed, high-privilege CRD host process. An authenticated attacker could potentially trigger this by requesting an RTC log transfer while generating significant logging activity.
Affected files:
remoting/protocol/webrtc_event_log_data.ccremoting/protocol/webrtc_event_log_data.hremoting/protocol/webrtc_transport.ccremoting/host/file_transfer/rtc_log_file_operations.ccremoting/host/client_session.cc
Estimated timestamp from git blame: 2020-10-07
Summary
A potential memory safety vulnerability exists in the Chrome Remote Desktop (CRD) host due to a data race in the remoting::protocol::WebrtcEventLogData class. The class manages WebRTC event logs using a base::circular_deque<std::vector<uint8_t>> that is accessed from multiple threads without synchronization. This can result in a Use-After-Free (UAF) or heap corruption in the high-privilege host process (typically running as SYSTEM on Windows or root on Linux).
Root Cause Analysis
The WebrtcEventLogData class (defined in remoting/protocol/webrtc_event_log_data.h) stores log events in a sections_ deque. It provides two primary methods that are invoked from different threads:
Write(std::string_view log_event): Invoked by the WebRTC internal logging task queue. In Chromium, this queue is backed by abase::ThreadPoolsequenced task runner. This method accessessections_.back()to append data to the current log section.TakeLogData(): Invoked on the CRD network thread (anAutoThread) when a client requests an RTC log transfer (via a data channel with thertc-log-transfer-prefix). This method moves thesections_deque into a local variable and clears the original member (remoting/protocol/webrtc_event_log_data.cc:34).
There is no synchronization (e.g., base::Lock) protecting the sections_ member. If TakeLogData() is called while a WebRTC logging task is executing Write(), a data race occurs on the deque.
Specifically, if Write() obtains a reference to the last section (auto& section = sections_.back()) and TakeLogData() simultaneously moves the deque, the reference held by Write() now points to a std::vector owned by the reader on the network thread. If the reader then destroys its copy of the data (for example, if the attacker closes the data channel immediately after requesting the transfer), the reference in Write() becomes dangling, leading to a Use-After-Free write when section.insert() is called.
Security Impact
The CRD host process is unsandboxed and operates with high system privileges. Successful exploitation of this race could allow an authenticated attacker to achieve arbitrary code execution in a high-privilege context. Furthermore, the rtcLogTransfer capability is enabled unconditionally in ClientSession, meaning this attack vector may be available even if enterprise policies restrict standard file transfers or put the session in 'view-only' mode.
Potential Reproduction Steps
Note: These steps are suggested based on code analysis; our current environment does not support functional execution of a PoC.
- Establish an authenticated CRD session (e.g., an It2Me support session).
- Generate frequent WebRTC event log entries by sending significant network traffic (RTP/RTCP) or frequently creating/closing data channels.
- In a loop, initiate multiple RTC log transfers by opening data channels with the prefix
rtc-log-transfer-and sending aRequestTransfermessage. - Immediately close each data channel after the request is sent to trigger the destruction of the moved log data.
- Observe for memory corruption or crashes in the host process. Under ThreadSanitizer (TSan), the data race between
WriteandTakeLogDatashould be readily identifiable.
Suggested Fix
Protect access to the sections_ member in WebrtcEventLogData using a base::Lock. Ensure that Write(), TakeLogData(), and Clear() all acquire the lock before accessing the deque. Alternatively, ensure all operations on WebrtcEventLogData are dispatched to the same sequenced task runner, although this may require refactoring how WebRTC's RtcEventLogOutput sink interacts with the data store.
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
The `sections_` deque in `WebrtcEventLogData` is accessed from a ThreadPool worker and the network thread with no lock, so a reference taken by `Write()` can dangle after `TakeLogData()` moves the deque.
Impact
An authenticated attacker could potentially achieve arbitrary code execution in the unsandboxed, high-privilege host process, and the log transfer capability is enabled even when policies restrict file transfers or force view-only mode; the report notes the steps are only suggested and no working exploit was run.
What the attacker needed
An authenticated CRD session; ability to open data channels to the host; heavy logging activity at the same time
The fix
Access to `sections_` should be protected with a lock in `Write()`, `TakeLogData()` and `Clear()`, or all operations should be dispatched to one sequenced task runner.
How it was found
- Start an authenticated Chrome Remote Desktop session.
- Generate frequent WebRTC event log entries with heavy network traffic or by repeatedly opening and closing data channels.
- Repeatedly request RTC log transfers over data channels using the log transfer prefix.
- Close each data channel straight after the request so the moved log data is destroyed.
- Watch the host process for crashes or memory corruption, or run it under ThreadSanitizer to see 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.
The host program keeps a list of log entries in memory. One thread adds new entries to the end of the list while another thread can take the whole list away when a client asks for the logs. Because nothing stops the two threads from acting at the same moment, the adding thread can end up writing into memory that has already been freed, which can crash the program or let an attacker run their own code.
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.