Use after free in TabStrip (CVE-2026-11632)
A use-after-free was reported in Chrome's tab drag handling, where a liveness check tracked the drag controller rather than the drag context itself, so a freed context could still be dereferenced. An attacker who could close the source window during a drag and groom the heap could potentially hijack control flow in the unsandboxed browser process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 14 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 Google Chrome browser process due to incorrect liveness tracking inside TabDragContextImpl. When dragging tabs enters a nested event loop or executes a drag completion/cancellation, the context can be destroyed, but the subsequent liveness checks are bypassed. This results in dereferencing the freed context (this) to invoke a virtual method, potentially leading to arbitrary code execution in the unsandboxed browser process.
Affected files:
chrome/browser/ui/views/tabs/tab_strip.cc
Estimated timestamp from git blame: 2025-02-06
Summary
There is a potential Use-After-Free (UAF) vulnerability in TabDragContextImpl::OnGestureEvent in chrome/browser/ui/views/tabs/tab_strip.cc. The core issue is twofold:
TabDragContextImpl::ContinueDragincorrectly returns the liveness of theTabDragControllerinstead of theTabDragContextImpl(this) object itself. Because the drag controller can be transferred to and owned by a new window during dragging, the controller can remain alive while the sourceTabDragContextImplis destroyed.- In
OnGestureEvent, the local safety check variabletabstrip_aliveis initialized toLiveness::kAlivebut is only updated duringkGestureScrollUpdateevents. For other events that invokeEndDrag(e.g.,kGestureScrollEnd),tabstrip_aliveremainsLiveness::kAliveeven if the context is destroyed during the teardown process.
In either case, safety checks are bypassed, and the code proceeds to invoke tab_strip_->OnGestureEvent(event), causing a UAF when dereferencing the freed this context to read tab_strip_ and call a virtual method on it.
Root Cause Analysis
In chrome/browser/ui/views/tabs/tab_strip.cc, ContinueDrag handles dragging progress and can enter a nested event/move loop (e.g., via drag_controller_->Drag()):
[[nodiscard]] Liveness ContinueDrag(views::View* view,
const ui::LocatedEvent& event) {
if (!drag_controller_.get() || ...) return Liveness::kAlive;
...
// Note: `tab_strip_` can be destroyed during drag, also destroying `this`.
const TabDragController::Liveness drag_controller_alive =
drag_controller_->Drag(screen_location); // <-- Nested event loop
return drag_controller_alive == TabDragController::Liveness::kAlive
? Liveness::kAlive : Liveness::kDeleted; // <-- Tracks the wrong object's liveness
}
If the source window (and thus this context) is closed during the nested loop, this is freed. However, because TabDragController may have been transferred to a new window (which is common when detaching tabs), drag_controller_alive is returned as Liveness::kAlive. This is incorrectly propagated back to the caller as the liveness of the TabDragContextImpl itself.
In TabDragContextImpl::OnGestureEvent (lines 224-262):
void OnGestureEvent(ui::GestureEvent* event) override {
Liveness tabstrip_alive = Liveness::kAlive;
switch (event->type()) {
...
case ui::EventType::kGestureScrollUpdate:
tabstrip_alive = ContinueDrag(this, *event); // Line 240
break;
...
}
event->SetHandled();
if (tabstrip_alive == Liveness::kDeleted) return; // Guard fails to prevent execution
tab_strip_->OnGestureEvent(event); // Line 261 — UAF virtual call on freed 'this'
}
If the context is destroyed during ContinueDrag under kGestureScrollUpdate, the liveness check evaluates to kAlive and is bypassed. Alternatively, if the event type is kGestureScrollEnd, it calls EndDrag(EndDragReason::kComplete). If EndDrag results in the destruction of the context (which occurs if detaching the last tab causes the source browser window to close synchronously or via posted tasks executed inside nested event pumps), tabstrip_alive remains its initial value of Liveness::kAlive. The guard at line 254 is entirely bypassed, and tab_strip_->OnGestureEvent(event) is called on the freed object.
Impact and MiraclePtr Status
Because the UAF occurs on the implicit this pointer (which is a raw C++ pointer), MiraclePtr / BackupRefPtr does not protect this scenario. BRP protects the pointee of a live raw_ptr; it cannot prevent reading raw pointer storage from an already freed enclosing object (this). Consequently, an attacker who successfully controls the freed memory block via heap grooming can hijack the control flow during the virtual method dispatch.
Potential Trigger Path (Theoretical/Suggested Steps)
Note: These steps are suggested based on static code analysis, as our tooling currently lacks the capability to execute and validate dynamic code.
- Touch Drag Start: A user touch-drags a tab in a source window
A(containing at least two tabs).OnGestureEventis dispatched, enteringContinueDragwhich runs the nested move loop viadrag_controller_->Drag(). - Tab Detachment: The tab is dragged out of window
A, which transfers theTabDragController(TDC) to a newly created windowC. WindowA'sdrag_controller_is set to null, making its window closeable. - Source Context Destruction: While the nested event loop of the TDC continues to run, window
Ais closed (e.g., via a script-triggeredwindow.close()or an extension'schrome.windows.removecall). This posts a destruction task that is processed inside the nested event loop, synchronously destroying windowA'sTabStripand itsTabDragContextImpl. - Propagation of Fake Liveness: The user finishes dragging, ending the nested loop. Since the TDC is still alive in window
C, it returnsLiveness::kAlive, which incorrectly propagates back as the liveness of the now-freed windowA'sTabDragContextImpl. - Use-After-Free: The liveness check is bypassed, and a virtual call to
tab_strip_->OnGestureEvent(event)is executed using the freedthispointer.
Suggested Fix
To resolve this, the vertical tab drag implementation has already been hardened with a self-WeakPtr guard (see chrome/browser/ui/views/tabs/vertical/vertical_tab_drag_handler.cc:332-336).
A similar fix should be applied to TabDragContextImpl inside chrome/browser/ui/views/tabs/tab_strip.cc by tracking the liveness of the context using its existing weak_factory_:
void OnGestureEvent(ui::GestureEvent* event) override {
auto weak_this = weak_factory_.GetWeakPtr();
switch (event->type()) {
...
}
event->SetHandled();
if (!weak_this) {
return;
}
tab_strip_->OnGestureEvent(event);
}
Evaluated with Chrome root at commit: a2bea94528f4bd6cc57739c43fa3bb890b8367d3
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 the liveness check returned the drag controller's state instead of the drag context's own state, and the local guard was only updated for scroll-update events, so a destroyed context was still dereferenced.
Impact
An attacker who controls the freed memory via heap grooming could potentially hijack control flow in the unsandboxed browser process; the report notes MiraclePtr does not protect this case and the trigger path is theoretical and unvalidated.
What the attacker needed
User touch-drags a tab; source window has at least two tabs; source window closed mid-drag; heap grooming by attacker
The fix
The context's liveness should be tracked with its existing weak pointer factory and the call skipped if the weak pointer is gone, as already done in the vertical tab drag handler.
How it was found
- A user touch-drags a tab in a source window with at least two tabs, entering the nested drag loop.
- The tab is dragged out, transferring the drag controller to a new window and making the source window closeable.
- While the nested loop runs, the source window is closed, destroying its tab strip and drag context.
- The drag ends and the still-alive controller reports itself alive, which is wrongly taken as the context being alive.
- The guard is bypassed and a virtual call is made through the freed context.
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.
When you drag a tab, Chrome runs a loop that keeps handling events until you let go. During that loop the window you started from can be closed and its memory freed, but the code still thinks it is safe to use. A use-after-free means the program keeps using memory it has already given back, which an attacker can try to fill with their own data.
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.