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

Use after free in Ozone (CVE-2026-15904)

A use-after-free vulnerability exists in the Wayland Ozone platform host of the Chromium browser process. During a GPU process disconnect, iterating over a snapshot of raw window pointers can lead to dereferencing a freed window if a synchronous observer destroys a later window in the list, potentially causing a browser crash or memory corruption.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 8 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 potential use-after-free (UAF) vulnerability exists in the Wayland Ozone platform host inside the browser process. During a GPU process disconnect, WaylandBufferManagerHost iterates over an on-stack snapshot of bare WaylandWindow pointers. Synchronous observer-driven destruction of a window can occur during the iteration, leaving subsequent elements in the snapshot pointing to freed memory.

Affected files:

  • ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc
  • ui/ozone/platform/wayland/host/wayland_window.cc
  • ui/ozone/platform/wayland/host/wayland_frame_manager.cc

Estimated timestamp from git blame: 2021-12-03

Description

A potential Use-After-Free (UAF) memory corruption vulnerability exists in the Wayland Ozone platform host within the Chromium Browser process.

When a GPU process disconnects or terminates, WaylandBufferManagerHost::OnChannelDestroyed() is invoked. This method snapshots all active platform windows into an on-stack std::vector<WaylandWindow*> of raw pointers and iterates over them to clear their states:

C++
// ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc
void WaylandBufferManagerHost::OnChannelDestroyed() {
  DCHECK(base::CurrentUIThread::IsSet());
  buffer_backings_.clear();
  dma_buffers_.clear();
  for (auto* window : connection_->window_manager()->GetAllWindows())   // Raw pointer snapshot
    window->OnChannelDestroyed();                                       // Potential UAF dereference
  buffer_manager_gpu_associated_.reset();
  receiver_.reset();
}

During the first iteration (e.g., on Window N), if the window has tab-capture active and is suspended, its should_ack_swap_without_commit_ flag will be true. This flag forces OnChannelDestroyed to execute a sequence of synchronous state-update actions that propagates out to platform-level window/widget observers via WindowTreeHostPlatform::OnBoundsChanged:

  1. Window_N->OnChannelDestroyed() calls frame_manager_->RecordFrame(...) with a placeholder frame.
  2. This triggers MaybeProcessPendingFrame(), entering the immediate swap-ack path.
  3. The window calls OnSequencePoint() -> MaybeApplyLatestStateRequest() -> delegate()->OnStateUpdate().
  4. WindowTreeHostPlatform::OnStateUpdate() observes a bounds/scale change and fires OnBoundsChanged().
  5. Observers responding to the bounds change (such as an anchored bubble/popup tied to Window N's bounds) may synchronously destroy Window N+1 via Widget::CloseNow().
  6. This calls ~WaylandWindow() on Window N+1, erasing it from WaylandWindowManager::window_map_ and freeing the memory.

However, because the on-stack snapshot in WaylandBufferManagerHost::OnChannelDestroyed() still holds the raw pointer to Window N+1, the subsequent loop iteration will dereference this freed pointer when calling window->OnChannelDestroyed(). Inside OnChannelDestroyed(), the code attempts to dereference frame_manager_ (a std::unique_ptr), resulting in a wild read and write (such as clearing internal deques) within deallocated memory inside the browser process.

Note: This vulnerability is not protected by MiraclePtr because the raw pointers are on-stack local variables (std::vector<WaylandWindow*>), and the dereferenced member frame_manager_ is a std::unique_ptr rather than a raw_ptr member variable.


Suggested Potential Steps to Reproduce

Note: Our analysis is based on static code tracing; we do not currently have a fully running proof-of-concept.

  1. Launch Chromium on Linux/Wayland.
  2. Open a main application window (Window N) and have a webpage initiate a tab capture (e.g., via getDisplayMedia()).
  3. Open a secondary platform-backed widget/bubble (Window N+1) that is anchored to Window N and designed to close when Window N changes bounds.
  4. Minimize or occlude Window N so it transitions to a suspended state (setting is_suspended_ = true).
  5. Force the GPU process to disconnect (e.g., by terminating the GPU process or simulating a GPU crash/pipe closure).
  6. The browser process executes WaylandBufferManagerHost::OnChannelDestroyed().
  7. Iteration on Window N causes a synchronous state and bounds update callout, triggering observers that synchronously close and destroy Window N+1.
  8. The loop advances to the next element, attempting to dereference the now-freed Window_N+1 pointer, resulting in a browser process crash or memory corruption.

Suggested Fix

To prevent the UAF, ensure that windows are verified to be alive before they are dereferenced during the loop. Since WaylandWindow inherits from base::SupportsWeakPtr<WaylandWindow>, we can snapshot the windows using weak pointers instead of raw pointers:

C++
void WaylandBufferManagerHost::OnChannelDestroyed() {
  DCHECK(base::CurrentUIThread::IsSet());

  buffer_backings_.clear();
  dma_buffers_.clear();

  std::vector<base::WeakPtr<WaylandWindow>> windows;
  for (auto* window : connection_->window_manager()->GetAllWindows()) {
    windows.push_back(window->AsWeakPtr());
  }

  for (auto& weak_window : windows) {
    if (weak_window) {
      weak_window->OnChannelDestroyed();
    }
  }

  buffer_manager_gpu_associated_.reset();
  receiver_.reset();
}

Evaluated with Chrome root at commit: 84065d9121f6e48f67755f0ae963cc09617e5c85


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 code iterates over a snapshot of raw pointers to windows without checking if each window still exists, and a synchronous callback during the iteration can free a window that is later dereferenced.

Impact

This could result in a browser process crash or memory corruption, potentially leading to code execution, though the report notes that a fully running proof-of-concept has not been developed.

What the attacker needed

Chromium on Linux/Wayland; GPU process disconnect; tab capture active; window in suspended state

The fix

The fix should use weak pointers instead of raw pointers when snapshotting windows, and check each weak pointer before dereferencing it.

How it was found

  1. Launch Chromium on Linux/Wayland.
  2. Open a main application window (Window N) and have a webpage initiate a tab capture (e.g., via getDisplayMedia()).
  3. Open a secondary platform-backed widget/bubble (Window N+1) that is anchored to Window N and designed to close when Window N changes bounds.
  4. Minimize or occlude Window N so it transitions to a suspended state (setting is_suspended_ = true).
  5. Force the GPU process to disconnect (e.g., by terminating the GPU process or simulating a GPU crash/pipe closure).
  6. The browser process executes WaylandBufferManagerHost::OnChannelDestroyed().

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 memory safety bug in the Chromium browser. When the graphics processing unit (GPU) process crashes, the browser tries to clean up all open windows. However, while doing so, an action triggered by one window can cause another window to be closed and its memory freed. The browser then tries to use that freed memory, which can lead to a crash or, in theory, allow an attacker to run malicious code.

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.