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

Use after free in Aura (CVE-2026-15905)

A use-after-free was identified in the ScopedCursorHider destructor on Linux/X11 Chrome, where a synchronous display query can trigger window destruction and free the cursor manager. An attacker could potentially cause memory corruption in the browser process, though no working exploit was demonstrated.

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 browser process of Linux/X11 Chrome within the ScopedCursorHider helper destructor. Synchronous event dispatching during display queries can trigger window closure, deleting the shared static CursorManager and the window itself. Subsequent virtual method calls on the freed CursorClient pointer or dereferences of the deleted window lead to memory corruption.

Affected files:

  • ui/aura/window.cc
  • ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
  • ui/ozone/platform/x11/x11_window.cc
  • ui/ozone/platform/x11/x11_screen_ozone.cc
  • ui/aura/screen_ozone.cc
  • ui/gfx/x/geometry_cache.cc

Estimated timestamp from git blame: 2025-03-06

Description

A potential Use-After-Free (UAF) vulnerability has been identified in ScopedCursorHider on Linux/X11 platforms. The vulnerability is located in ui/aura/window.cc inside the destructor of the stack-allocated ScopedCursorHider helper class.

When a device scale factor change occurs, the root window's OnDeviceScaleFactorChanged creates a ScopedCursorHider on the stack to temporarily hide the cursor. In its destructor, ~ScopedCursorHider() captures a raw pointer to client::CursorClient (which points to the static views::DesktopNativeWidgetAura::cursor_manager_) and then calls display::Screen::Get()->GetDisplayNearestWindow(window_) before making virtual calls on the captured pointer.

C++
// ui/aura/window.cc
~ScopedCursorHider() {
  if (!window_->IsRootWindow())
    return;
  if (hid_cursor_) {
    client::CursorClient* cursor_client = client::GetCursorClient(window_);
    if (cursor_client) {
      const display::Display& display =
          display::Screen::Get()->GetDisplayNearestWindow(window_); // *** Potential Synchronous Deletion Sink ***
      cursor_client->SetDisplay(display);                          // *** Virtual call on potentially freed client ***
      cursor_client->ShowCursor();                           
    }
  }
}

Potential Mechanism of the Vulnerability

  1. On Linux/X11, GetDisplayNearestWindow(window_) propagates to X11ScreenOzone::GetDisplayForAcceleratedWidget(), which queries the window's pixel bounds via window->GetBoundsInPixels().
  2. If the underlying GeometryCache parent chain is un-Ready (e.g., following a recent ReparentNotify event), GetBoundsPx() synchronously dispatches pending futures using parent_future_.DispatchNow().
  3. The synchronous blocking and response processing can dispatch bounds change callbacks, invoking X11Window::OnBoundsChanged -> NotifyBoundsChanged -> PlatformWindowDelegate::OnBoundsChanged.
  4. If a registered widget or window observer synchronously destroys the window tree host (such as during dynamic tab-snapping or window-snapping closure), this invokes DesktopNativeWidgetAura::OnHostClosed(), deleting the root window and resetting the static cursor_manager_ via RootWindowDestroyed().
  5. When control returns to ~ScopedCursorHider(), both the root Window and the cursor_manager_ (to which cursor_client points) have been freed. The destructor then attempts to perform virtual calls SetDisplay() and ShowCursor() on the freed cursor_client pointer, resulting in a Use-After-Free memory corruption inside the browser process.

Note: Our tooling currently lacks the capability to run code or compile a working proof of concept, so these steps are based on a static code review and are presented as a potential vulnerability scenario.

Suggested Fix

To prevent this vulnerability, the lifetime of the window_ and the validity of the cursor_client must be verified after returning from any potentially synchronous display query. This can be achieved by using aura::WindowTracker to monitor if the window is destroyed during the call:

C++
~ScopedCursorHider() {
  if (!window_->IsRootWindow())
    return;

  if (hid_cursor_) {
    aura::WindowTracker tracker({window_});
    const display::Display& display =
        display::Screen::Get()->GetDisplayNearestWindow(window_);
    
    // Guard against window or cursor client destruction
    if (tracker.Contains(window_)) {
      client::CursorClient* cursor_client = client::GetCursorClient(window_);
      if (cursor_client) {
        cursor_client->SetDisplay(display);
        cursor_client->ShowCursor();
      }
    }
  }
}

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

Likely the destructor of ScopedCursorHider calls a display query that can synchronously dispatch events leading to destruction of the window and the static cursor manager, without revalidating the pointers afterwards.

Impact

The use-after-free could lead to memory corruption in the browser process, potentially allowing an attacker to crash or execute code, though no exploit was demonstrated and the report is based on static analysis.

What the attacker needed

Linux/X11 Chrome; device scale factor change; synchronous window destruction during query

The fix

The fix should revalidate the window and cursor client after the synchronous display query, for example by using aura::WindowTracker to check whether the window still exists before making virtual calls.

How it was found

  1. A device scale factor change causes the root window's OnDeviceScaleFactorChanged to create a ScopedCursorHider on the stack.
  2. In the destructor, a raw pointer to the cursor client is captured and GetDisplayNearestWindow is called.
  3. On Linux/X11, this query reaches X11ScreenOzone::GetDisplayForAcceleratedWidget, which calls GetBoundsInPixels on the window.
  4. If the geometry cache parent chain is not ready, pending futures are dispatched synchronously, triggering bounds change callbacks.
  5. A registered observer may synchronously destroy the window tree host, deleting the root window and resetting the static cursor manager.
  6. Control returns to the destructor, which makes virtual calls on the freed cursor client pointer, causing a use-after-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.

A use-after-free happens when a program keeps using a piece of memory after it has been freed. Here, a helper that hides the mouse cursor asks the system for screen information, and that request can unexpectedly close the window and delete the cursor object. When the helper then tries to use that deleted object, the program may crash or be manipulated by an attacker.

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.