Use after free in Audio (CVE-2026-10933)
A use-after-free vulnerability exists in the browser process due to incorrect COM lifetime management in AudioSessionCreationObserverWin, which stubs AddRef and Release. An attacker who compromises a renderer could potentially trigger the race condition and, by reclaiming the freed memory, hijack the vtable to achieve arbitrary code execution.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 53 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.
Overview: A potential use-after-free vulnerability exists in the browser process due to incorrect COM lifetime management in AudioSessionCreationObserverWin. The class stubs its AddRef() and Release() methods, meaning the Windows audio subsystem holds a dangling pointer after the object is destroyed by its owning unique_ptr. Concurrent audio session notifications from the OS multimedia thread can then execute on this freed memory.
Affected files:
media/audio/win/audio_session_creation_observer_win.ccmedia/audio/win/audio_ducker_win.ccmedia/audio/win/audio_ducker_win.hchrome/browser/media/audio_ducker.ccchrome/browser/glic/host/glic_page_handler.cc
Estimated timestamp from git blame: 2025-05-29
Summary
A potential use-after-free (UAF) vulnerability exists in the Chrome browser process on Windows due to incorrect lifetime management of the AudioSessionCreationObserverWin COM object. The class violates COM reference counting contracts by stubbing its AddRef() and Release() methods, allowing the object to be destroyed while the Windows audio subsystem still holds a pointer to it. This can lead to a race condition where the OS attempts to dispatch an event on a background thread to an object that has already been freed on the UI thread.
Technical Details
AudioSessionCreationObserverWin (in media/audio/win/audio_session_creation_observer_win.cc) implements the IAudioSessionNotification interface. However, it overrides the IUnknown lifetime management methods to simply return a constant:
ULONG AudioSessionCreationObserverWin::AddRef() {
return 1;
}
ULONG AudioSessionCreationObserverWin::Release() {
return 1;
}
Because of this, the Windows OS cannot properly pin the object's lifetime.
The observer is instantiated by AudioDuckerWin (media/audio/win/audio_ducker_win.cc) and stored in a std::unique_ptr<AudioSessionCreationObserverWin> session_creation_observer_. It is registered with the OS via IAudioSessionManager2::RegisterSessionNotification.
The vulnerability is triggered during teardown. When the Glic guest page is closed or navigates away:
- The
content::Pageis destroyed, which destroys theAudioDucker(PageUserData). ~AudioDuckerdestroys theAudioDuckerWininstance on the UI thread.AudioDuckerWin's destructor callsUnregisterSessionNotification(session_creation_observer_.get()).- Immediately after, the
unique_ptris destroyed, freeing theAudioSessionCreationObserverWinmemory.
Crucially, the Windows API UnregisterSessionNotification is synchronous but does not block or cancel callbacks that are currently being dispatched or queued on the background OS multimedia thread. If an audio session is created concurrently (e.g., by another application or tab), the OS multimedia thread may invoke IAudioSessionNotification::OnSessionCreated using the pointer it holds.
Because the OS's internal AddRef calls were ignored, it will dereference the freed pointer to perform a virtual method call. If an attacker reclaims this freed memory (e.g., via heap spraying), they can hijack the vtable.
Note: This vulnerability is not protected by MiraclePtr (BRP) because the dangling pointer is held internally by a Windows system DLL (audioses.dll), not by a Chromium raw_ptr.
Potential Reproduction Steps
Note: These are suggested steps derived from static analysis; our tooling cannot execute code to provide a working proof of concept.
- An attacker compromises a renderer process (e.g., the Glic guest page via a separate vulnerability or by loading malicious code in the guest context).
- The attacker calls the Glic JS API
glic.host.setAudioDucking(true). This routes via Mojo to the browser process and instantiates theAudioSessionCreationObserverWin, registering it with the OS. - The attacker triggers the creation of new audio sessions system-wide (e.g., repeatedly playing an
<audio>element in another compromised frame). - Concurrently, the attacker quickly unloads the Glic guest page (e.g., via
location.reload()or closing the panel) to trigger theAudioDuckerteardown sequence on the UI thread. - By spraying the browser process heap, the attacker reclaims the freed observer object.
- When the race condition is won, the OS multimedia thread executes an indirect call using the attacker-controlled vtable, leading to arbitrary code execution in the browser process.
Suggested Fix
AudioSessionCreationObserverWin should properly implement COM reference counting. It can be implemented using Microsoft::WRL::RuntimeClass with RuntimeClassFlags<ClassicCom> or by making it inherit from base::RefCountedThreadSafe.
Instead of managing the observer strictly via a std::unique_ptr in AudioDuckerWin, AudioDuckerWin should hold a COM reference (Microsoft::WRL::ComPtr). During teardown, AudioDuckerWin should call UnregisterSessionNotification and release its reference. The object itself should only be destroyed when its reference count drops to zero, which ensures it stays alive if the Windows OS is concurrently dispatching a callback.
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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 class stubs its AddRef and Release methods, violating COM reference counting, so the object can be destroyed while the Windows audio subsystem still holds a pointer to it.
Impact
An attacker could potentially achieve arbitrary code execution in the browser process, but the report notes that the reproduction steps are suggested from static analysis and no working proof of concept was executed.
What the attacker needed
Compromised renderer process; ability to call Glic JS API; race condition won; heap spraying
The fix
The observer should properly implement COM reference counting, for example using Microsoft::WRL::RuntimeClass or base::RefCountedThreadSafe, and AudioDuckerWin should hold a COM reference (ComPtr) instead of a unique_ptr, releasing it only after UnregisterSessionNotification.
How it was found
- An attacker compromises a renderer process, such as the Glic guest page.
- The attacker calls the Glic JS API to enable audio ducking, which instantiates and registers the observer.
- The attacker triggers the creation of new audio sessions system-wide.
- Concurrently, the attacker unloads the Glic guest page to trigger teardown on the UI thread.
- The attacker sprays the browser process heap to reclaim the freed observer object.
- When the race condition is won, the OS multimedia thread executes an indirect call using the attacker-controlled vtable.
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 open it. Here, a Windows audio component holds a pointer to an object that Chrome has already destroyed, so when the system later calls a function on that pointer, it can run attacker-controlled code. This could let someone who already controls a web page take over the browser process.
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.