Skip to content
Memory corruption Advisory Advanced CVE-2026-78913

Use after free in Chromoting (CVE-2026-78913)

A use-after-free exists in the Linux Chrome Remote Desktop host when terminating audio capture sessions, because the PipeWire real-time thread may still run callbacks after the Core object is destroyed. An authenticated attacker could potentially exploit this to achieve remote code execution in the unsandboxed host process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

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 (UAF) exists in the Linux Chrome Remote Desktop host when terminating audio capture sessions. The PipewireAudioCapturer::Core object is destroyed on the main thread while the PipeWire real-time processing thread may still be executing callbacks. This can lead to Remote Code Execution (RCE) in the unsandboxed host process.

Affected files:

  • remoting/host/linux/pipewire_audio_injector.cc
  • remoting/host/linux/pipewire_audio_capturer.cc
  • remoting/host/linux/pipewire_utils.cc

Estimated timestamp from git blame: Unknown (Google3 checkout)

Summary

A cross-thread Use-After-Free (UAF) vulnerability has been identified in remoting::PipewireAudioCapturer::Core (and likely PipewireAudioInjector::Core) within the Chrome Remote Desktop host for Linux. The issue arises because the PipeWire real-time (RT) processing thread is not properly synchronized with the destruction of the Core object, allowing audio processing callbacks to execute on freed memory.

Technical Details

When an audio session is initiated, CreatePipewireStream (in remoting/host/linux/pipewire_utils.cc) configures the PipeWire stream using the PW_STREAM_FLAG_RT_PROCESS flag. This flag directs PipeWire to execute the .process callback (HandleStreamProcess) on a dedicated, high-priority real-time thread, separate from the main control loop (pw_main_loop_).

The Core object registers itself as the callback context by passing its this pointer as a raw void* data argument to the C library (pw_stream_add_listener). Because this pointer crosses the C ABI boundary, it is not protected by MiraclePtr (BackupRefPtr).

When the audio session is terminated, Core::~Core() executes on the main thread:

  1. pw_thread_loop_stop(pw_main_loop_.get()) is called. This successfully stops the main control thread loop but does not wait for or stop the independent RT data thread.
  2. pw_stream_ = nullptr; is executed, invoking pw_stream_destroy(). While this disconnects and destroys the stream structure, it does not synchronously guarantee that in-flight RT thread callbacks have completed.
  3. The Core object completes destruction, and its memory is returned to the allocator.

Because the RT thread may still be executing HandleStreamProcess (or is just about to), it will use the dangling data pointer.

Potential Exploitation Steps

An authenticated attacker could potentially exploit this via the following steps:

  1. Initiate Session: The attacker initiates an audio capture session, causing the allocation of a PipewireAudioCapturer::Core object.
  2. Trigger Race: The attacker abruptly terminates the session. This starts the main thread teardown sequence.
  3. Heap Grooming: Immediately after termination, the attacker performs other standard CRD host interactions to reclaim the freed Core object's memory slot with attacker-controlled bytes.
  4. Member Forgery: The attacker crafts the reclaimed memory to forge specific members:
    • pw_: A raw_ref pointing to the library loader. The attacker points this to a fake structure containing a target function pointer (e.g., system()).
    • pw_stream_: The stream pointer. The attacker sets this to point to an arbitrary command string (e.g., "/bin/sh").
  5. RCE Execution: The RT thread executes HandleStreamProcess() on the forged object. It reaches the line pw_->pw_stream_dequeue_buffer(pw_stream_.get());. Because this function is annotated with DISABLE_CFI_DLSYM (disabling Control Flow Integrity for indirect calls), the program jumps to the attacker's fake function pointer with their chosen argument, leading to Remote Code Execution.

Impact

The CRD host on Linux does not utilize a Chromium sandbox. Worker processes typically run under privilege separation (e.g., the network process runs as the _crd_network user, and the desktop process runs as the logged-in user). Successful exploitation provides RCE in this context, compromising the user session or the dedicated network user account.

Suggested Fix

The teardown sequence must ensure that the RT thread has completely finished processing before the Core object is destroyed. Relying on pw_stream_destroy() is insufficient if it does not block the RT thread.

Consider utilizing PipeWire's thread-loop signaling mechanisms, or temporarily lock the data thread loop (if supported by the PipeWire API used) during destruction to guarantee synchronization. Alternatively, ensure that HandleStreamProcess safely checks validity, though this is difficult without a thread-safe ref-counting mechanism that survives the C ABI boundary.

Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 teardown sequence stops the main PipeWire loop and destroys the stream but does not wait for the independent real-time processing thread to finish, so callbacks can still use the freed Core object.

Impact

Successful exploitation could provide remote code execution in the unsandboxed host process, compromising the user session or the dedicated network user account.

What the attacker needed

Authenticated attacker; ability to start and stop audio sessions; ability to perform other host interactions

The fix

The teardown sequence should ensure the real-time thread has completely finished before the Core object is destroyed, for example by using PipeWire's thread-loop signalling or locking the data thread loop during destruction.

How it was found

  1. The attacker initiates an audio capture session, causing a Core object to be allocated.
  2. The attacker abruptly terminates the session, starting the main thread teardown sequence.
  3. The attacker performs other standard host interactions to reclaim the freed memory with controlled bytes.
  4. The attacker forges members of the reclaimed object to point to a fake function pointer and command string.
  5. The real-time thread executes the process callback on the forged object, jumping to the attacker's function pointer and achieving code execution.

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 frees memory but keeps using it, like deleting a file and then trying to read it. Here, the audio capture object is destroyed while a background audio thread might still be running its code, so that thread could use the freed memory. An attacker who can start and stop audio sessions might be able to control what ends up in that freed memory and take over 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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.