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

Use after free in Audio (CVE-2026-14149)

A double-unref of PulseAudio operation objects in the Chrome audio service on Linux could cause a double-free or use-after-free. An attacker could potentially trigger this via the getDisplayMedia API with a specific constraint, leading to memory corruption and possible code execution.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 41 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 logic error in media/audio/pulse/pulse_util.cc results in a redundant call to pa_operation_unref, causing a potential double-free or use-after-free of PulseAudio operation objects. This occurs within the Audio Service process, which on Linux is currently unsandboxed by default. The vulnerability is potentially reachable through the getDisplayMedia API when specific audio loopback features are enabled.

Affected files:

  • media/audio/pulse/pulse_util.cc
  • media/audio/pulse/pulse_loopback.cc
  • media/audio/pulse/pulse_loopback_manager.cc
  • media/audio/pulse/audio_manager_pulse.cc

Estimated timestamp from git blame: 2024-09-04

Vulnerability Details

A potential memory safety vulnerability exists in the PulseAudio utility implementation within the Chrome audio stack on Linux. The issue is a double-unref (which leads to a double-free) of pa_operation objects in media/audio/pulse/pulse_util.cc.

The helper function WaitForOperationCompletion is designed to wait for a PulseAudio operation to finish and then release the caller's reference. As seen in media/audio/pulse/pulse_util.cc:

C++
390: bool WaitForOperationCompletion(pa_threaded_mainloop* mainloop,
391:                                 pa_operation* operation,
...
425:   pa_operation_unref(operation);
426:   return true;
427: }

However, two functions added for PulseAudio system-loopback support incorrectly call pa_operation_unref a second time after WaitForOperationCompletion returns, despite the reference already being consumed:

  1. MuteAllSinksExcept (lines 679-682):

    C++
    679:   WaitForOperationCompletion(mainloop, op, context);
    680:   // Clean up the operation after completion
    681:   if (op) {
    682:     pa_operation_unref(op);
    683:   }
    
  2. UnmuteAllSinks (lines 718-721):

    C++
    718:   WaitForOperationCompletion(mainloop, op, context);
    719:   // Wait for the operation to complete to ensure all sinks are unmuted.
    720:   if (op) {
    721:     pa_operation_unref(op);
    722:   }
    

Since WaitForOperationCompletion already calls pa_operation_unref on the provided pointer, the subsequent call in the parent function results in a double-free of the pa_operation object. This can lead to heap corruption within the PulseAudio library or the process's allocator.

Impact and Reachability

On Linux, the Audio Service typically runs as a separate utility process where the sandbox is disabled by default (the kAudioServiceSandbox feature is base::FEATURE_DISABLED_BY_DEFAULT for Linux in content/public/common/content_features.cc). Memory corruption in this process could lead to arbitrary code execution with the privileges of the user running Chromium.

This code path is reachable when the kPulseaudioLoopbackForScreenShare feature flag is enabled. An attacker could potentially trigger this by invoking the getDisplayMedia API with the suppressLocalAudioPlayback: true constraint. This configuration routes the request through AudioManagerPulse and PulseLoopbackManager, eventually calling the vulnerable functions in pulse_util.cc.

Potential Trigger Steps

Note: These steps are based on code analysis; our tooling cannot yet execute code to verify a proof-of-concept.

  1. The user must have the experimental flag enabled (e.g., via chrome://flags/#pulseaudio-loopback-for-screen-share).
  2. An attacker-controlled page calls navigator.mediaDevices.getDisplayMedia({ audio: { suppressLocalAudioPlayback: true } }).
  3. The user is prompted to share their screen and accepts.
  4. This triggers MuteAllSinksExcept in the Audio Service, causing the potential double-free of the PulseAudio operation object.
  5. Closing the shared stream triggers UnmuteAllSinks, causing a second potential double-free.

Suggested Fix

Remove the redundant calls to pa_operation_unref(op) in MuteAllSinksExcept and UnmuteAllSinks (lines 682 and 721 in media/audio/pulse/pulse_util.cc). The WaitForOperationCompletion helper already correctly handles the reference release.

Additionally, MuteAllSinksExcept should be updated to properly unref the operation returned by pa_context_set_sink_mute_by_index (lines 671-673) to prevent a memory leak, similar to the corrected logic seen in other parts of the PulseAudio utility.

Evaluated with Chrome root at commit: 29093e11cf509e3593f6229e4b1b075cca356049


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 helper function WaitForOperationCompletion already releases the operation reference, but two caller functions incorrectly release it again, causing a double-free.

Impact

Memory corruption in the unsandboxed Audio Service process could lead to arbitrary code execution with the user's privileges, but only if the experimental flag is enabled and the user accepts a screen-sharing prompt.

What the attacker needed

Experimental flag enabled; User accepts screen share prompt; Attacker-controlled page

The fix

The redundant calls to pa_operation_unref in MuteAllSinksExcept and UnmuteAllSinks should be removed, and MuteAllSinksExcept should properly unref the operation returned by pa_context_set_sink_mute_by_index to prevent a memory leak.

How it was found

  1. Enable the experimental flag for PulseAudio loopback for screen share.
  2. An attacker-controlled page calls getDisplayMedia with the suppressLocalAudioPlayback constraint set to true.
  3. The user is prompted to share their screen and accepts.
  4. This triggers MuteAllSinksExcept, causing a potential double-free.
  5. Closing the shared stream triggers UnmuteAllSinks, causing a second potential double-free.

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 bug in Chrome's audio handling on Linux. A function that manages audio operations frees the same memory twice, which can corrupt memory and let an attacker run code. The bug is only reachable if a special experimental feature is turned on and the user shares their screen with audio.

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.