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.ccchrome/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
-
Call Stack Entry: When a window's tab dragging state changes,
BrowserDesktopWindowTreeHostLinux::TabDraggingKindChangedis invoked, which callsx11_extension->SetOverrideRedirect(is_dragging_window)(seechrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc). -
Synchronous Mapping and Re-entrancy:
X11Window::SetOverrideRedirecthides and then maps the window viaMap()(seeui/ozone/platform/x11/x11_window.cc). InsideMap(),GetBoundsInPixels()is called to query size hints. This delegates togeometry_cache_->GetBoundsPx(). -
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 viaparent_future_.DispatchNow()(seeui/gfx/x/geometry_cache.cc). This synchronously pumps pending X server responses. -
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:X11Windowis destroyed viaSetPlatformWindow(nullptr).BrowserDesktopWindowTreeHostLinuxis destroyed viahost_.reset().
-
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 readhas_pointer_grab_and write toshould_grab_pointer_after_map_on a freedX11Windowinstance. - In
BrowserDesktopWindowTreeHostLinux::TabDraggingKindChanged, the code attempts to dereferenceplatform_window()on the freed host instance to perform a Wayland extension check, leading to a potential wild pointer dereference.
- In
Potential Trigger Steps
To trigger this path, a tester or user would potentially perform the following actions:
- Run Chromium on Linux/X11 under a tiling window manager (e.g., i3 or awesome).
- Open a browser window containing tabs.
- 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:
- In
X11Window::SetOverrideRedirect, check a weak reference after callingMap():
auto weak_this = weak_ptr_factory_.GetWeakPtr();
Map();
if (!weak_this) {
return;
}
if (has_pointer_grab_) {
should_grab_pointer_after_map_ = true;
}
- In
BrowserDesktopWindowTreeHostLinux::TabDraggingKindChanged, verify the host's liveness using a weak pointer check after callingSetOverrideRedirect:
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.
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
- Run Chromium on Linux/X11 under a tiling window manager.
- Open a browser window containing tabs.
- 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.