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

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

A use-after-free was identified in the Linux/X11 tab dragging code path, where synchronous event dispatch during window remapping can destroy the X11Window and BrowserDesktopWindowTreeHostLinux objects while their methods are still on the call stack. An attacker could potentially trigger a wild pointer dereference by causing a tab drag that closes the source window during a pending geometry sync.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 32 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 Linux/X11 tab dragging path. Synchronous event dispatch during window remapping can trigger the destruction of both the X11Window and BrowserDesktopWindowTreeHostLinux objects. Subsequent execution on the unwinding call stack results in memory access on these freed objects.

Affected files:

  • ui/ozone/platform/x11/x11_window.cc
  • chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc

Estimated timestamp from git blame: 2025-03-06

Detailed Description

A potential Use-After-Free (UAF) vulnerability has been identified in the Linux/X11 window management code path, specifically during tab dragging under tiling window managers. The vulnerability stems from synchronous re-entrancy during geometry queries, which can destroy the window and host objects while their methods are still active on the call stack.

Note: These findings and reproduction steps are based on source-code analysis; our tooling does not currently have the capability to run code or verify a live exploit.

Vulnerability Mechanism

  1. Call Stack Entry: When a window's tab dragging state changes, BrowserDesktopWindowTreeHostLinux::TabDraggingKindChanged is invoked, which calls x11_extension->SetOverrideRedirect(is_dragging_window) (see chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc).

  2. Synchronous Mapping and Re-entrancy: X11Window::SetOverrideRedirect hides and then maps the window via Map() (see ui/ozone/platform/x11/x11_window.cc). Inside Map(), GetBoundsInPixels() is called to query size hints. This delegates to geometry_cache_->GetBoundsPx().

  3. Synchronous Event Pump: If the geometry cache is currently un-Ready (for example, following a recent window reparenting event), GeometryCache::GetBoundsPx() forces a synchronous dispatch via parent_future_.DispatchNow() (see ui/gfx/x/geometry_cache.cc). This synchronously pumps pending X server responses.

  4. Re-entrant Object Destruction: The synchronous dispatch runs the bounds change callback, notifying WindowTreeHostPlatform::OnBoundsChanged. If an observer reacts to the bounds/position change by closing the widget (e.g., detaching the last tab from the window during a drag), a sequence of synchronous destructions is triggered:

    • X11Window is destroyed via SetPlatformWindow(nullptr).
    • BrowserDesktopWindowTreeHostLinux is destroyed via host_.reset().
  5. Unwinding Use-After-Free: When the nested synchronous dispatch completes, the execution stack unwinds back to the caller frames:

    • In X11Window::SetOverrideRedirect, the code attempts to read has_pointer_grab_ and write to should_grab_pointer_after_map_ on a freed X11Window instance.
    • In BrowserDesktopWindowTreeHostLinux::TabDraggingKindChanged, the code attempts to dereference platform_window() on the freed host instance to perform a Wayland extension check, leading to a potential wild pointer dereference.

Potential Trigger Steps

To trigger this path, a tester or user would potentially perform the following actions:

  1. Run Chromium on Linux/X11 under a tiling window manager (e.g., i3 or awesome).
  2. Open a browser window containing tabs.
  3. Initiate a tab drag operation that causes the dragged tab to be detached or snapped, synchronously closing the source window while a geometry sync is pending.

Suggested Fix

To mitigate this issue, implement WeakPtr guards across the synchronous boundaries to detect object destruction and abort further execution:

  1. In X11Window::SetOverrideRedirect, check a weak reference after calling Map():
C++
auto weak_this = weak_ptr_factory_.GetWeakPtr();
Map();
if (!weak_this) {
  return;
}
if (has_pointer_grab_) {
  should_grab_pointer_after_map_ = true;
}
  1. In BrowserDesktopWindowTreeHostLinux::TabDraggingKindChanged, verify the host's liveness using a weak pointer check after calling SetOverrideRedirect:
C++
auto weak_this = GetWeakPtr();
x11_extension->SetOverrideRedirect(is_dragging_window);
if (!weak_this) {
  return;
}

Evaluated with Chrome root at commit: 208ca3371d87589335b108c431b95a36d768dc47


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, synchronous re-entrancy during geometry queries allows the window and host objects to be destroyed while their methods are still active on the call stack, leading to use-after-free.

Impact

The use-after-free could lead to a wild pointer dereference, potentially causing a crash or other undefined behaviour, though the report notes the findings are based on source-code analysis and not a verified live exploit.

What the attacker needed

Linux/X11 environment; tiling window manager; tab drag operation

The fix

The issue should be fixed by adding WeakPtr guards across the synchronous boundaries to detect object destruction and abort further execution.

How it was found

  1. Run Chromium on Linux/X11 under a tiling window manager.
  2. Open a browser window containing tabs.
  3. Initiate a tab drag operation that causes the dragged tab to be detached or snapped, synchronously closing the source window while a geometry sync is pending.

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 use-after-free bug, which happens when a program frees an object from memory but then tries to use it again. In this case, while handling a tab drag, the browser can destroy a window object and then continue running code that accesses that same object, which could crash or be exploited. The report is based on reading the source code, not on running a live exploit.

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.