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

Use after free in Views (CVE-2026-87514)

A use-after-free was identified in the Linux desktop drag-and-drop client, where the drop callback runs synchronously and can spin a nested run loop that destroys the client. The code then continues to use the deleted object, which the report says could let an attacker hijack virtual calls in the browser process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

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 DesktopDragDropClientOzone::OnDragDrop on Linux desktop platforms. When completing a drag-and-drop operation, the drop callback is executed synchronously, which can spin a nested run loop and destroy the client. The subsequent unguarded code execution on the deleted client leads to a Use-After-Free.

Affected files:

  • ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc

Estimated timestamp from git blame: 2022-02-16

Root Cause Analysis

In ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc, the OnDragDrop method handles the drop portion of a drag-and-drop sequence:

C++
// ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc:308-332
void DesktopDragDropClientOzone::OnDragDrop(int modifiers) {
  modifiers_ = modifiers;
  if (data_to_drop_) {
    auto event = UpdateTargetAndCreateDropEvent();
    if (delegate_ && event) {
      if (auto drop_cb = delegate_->GetDropCallback(*event)) {
        base::ScopedClosureRunner drag_cancel(
            base::BindOnce(&DesktopDragDropClientOzone::DragCancel,
                           weak_factory_.GetWeakPtr()));

        auto* data_to_drop_raw = data_to_drop_.get();
        DropIfAllowed(
            data_to_drop_raw, current_drag_update_info_,
            base::BindOnce(&PerformDrop, std::move(drop_cb),
                           std::move(data_to_drop_), std::move(drag_cancel)));

        observers_.Notify(
            &aura::client::DragDropClientObserver::OnDragCompleted, *event);
      }
    }
  }
  ResetDragDropTarget(/*send_exit=*/false);
}

On Linux desktop (Wayland/X11), the DropIfAllowed helper runs the callback synchronously on the same call stack because there is no active DataTransferPolicyController instance (which is only present on ChromeOS):

C++
// ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc:96-109
void DropIfAllowed(...) {
  if (ui::DataTransferPolicyController::HasInstance()) {
    ...
  } else {
    std::move(drop_cb).Run(); // Synchronously executed on Linux Desktop
  }
}

If the executed drop callback (or associated activation events) spins a nested run loop (for example, opening a modal file dialog or explicitly spinning a nested task loop like in components/exo/DataDevice), a queued task to destroy the top-level window widget (such as CloseNow()) can run inside that nested loop.

When the widget is closed, DesktopNativeWidgetAura::OnHostWillClose() detaches and deletes the drag-and-drop client:

C++
// ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:533
drag_drop_client_.reset(); // Deletes DesktopDragDropClientOzone

Once the nested loop unwinds and the callback returns, the execution flow in OnDragDrop resumes and immediately attempts to access observers_ and invoke ResetDragDropTarget(/*send_exit=*/false) on a deleted this pointer. Since observers_ and entered_window_observation_ are value-typed member variables on the heap, reclaiming this memory allows an attacker to hijack virtual method calls or manipulate pointers in ScopedObservation::Reset(), bypassing the V8 sandbox directly in the browser process.

Note that our tooling does not currently have the capability to run an active proof-of-concept; these steps and behaviors are analyzed directly from the codebase.

Potential Trigger Sequence

  1. The user triggers a drop event onto a target window on Linux Wayland/X11.
  2. The platform layer dispatches the event, ultimately calling DesktopDragDropClientOzone::OnDragDrop().
  3. The drop callback is executed synchronously via DropIfAllowed and spins a nested run loop.
  4. During the nested loop execution, a widget closure task (e.g. CloseNow()) is processed, resulting in the destruction of DesktopDragDropClientOzone.
  5. The nested loop terminates, and execution resumes in OnDragDrop(), accessing the deleted this pointer to notify observers and reset the drag-drop target.

Suggested Fix

Introduce a WeakPtr check immediately following the call to DropIfAllowed to ensure this is still alive before executing the rest of the method:

C++
void DesktopDragDropClientOzone::OnDragDrop(int modifiers) {
  modifiers_ = modifiers;
  if (data_to_drop_) {
    auto event = UpdateTargetAndCreateDropEvent();
    if (delegate_ && event) {
      if (auto drop_cb = delegate_->GetDropCallback(*event)) {
        base::ScopedClosureRunner drag_cancel(
            base::BindOnce(&DesktopDragDropClientOzone::DragCancel,
                           weak_factory_.GetWeakPtr()));

        auto* data_to_drop_raw = data_to_drop_.get();
        auto alive = weak_factory_.GetWeakPtr(); // Track lifetime
        DropIfAllowed(
            data_to_drop_raw, current_drag_update_info_,
            base::BindOnce(&PerformDrop, std::move(drop_cb),
                           std::move(data_to_drop_), std::move(drag_cancel)));

        if (!alive) {
          return;
        }

        observers_.Notify(
            &aura::client::DragDropClientObserver::OnDragCompleted, *event);
      }
    }
  }
  ResetDragDropTarget(/*send_exit=*/false);
}

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 drop callback is invoked synchronously and may run a nested loop that destroys the client, but the caller does not re-check that the object is still alive before touching its members.

Impact

Reclaiming the freed memory could allow an attacker to hijack virtual method calls or manipulate pointers in the browser process, though the report notes no working proof-of-concept was run.

What the attacker needed

Linux desktop (Wayland or X11); user performs a drag-and-drop; drop callback spins a nested loop

The fix

The report suggests adding a WeakPtr check after DropIfAllowed so the method returns early if the client has been destroyed; it does not say the issue was fixed.

How it was found

  1. The user triggers a drop event onto a target window on Linux Wayland/X11.
  2. The platform layer dispatches the event, ultimately calling DesktopDragDropClientOzone::OnDragDrop().
  3. The drop callback is executed synchronously via DropIfAllowed and spins a nested run loop.
  4. During the nested loop execution, a widget closure task (e.g. CloseNow()) is processed, resulting in the destruction of DesktopDragDropClientOzone.
  5. The nested loop terminates, and execution resumes in OnDragDrop(), accessing the deleted this pointer to notify observers and reset the drag-drop target.

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 something and drop it, the browser runs some code to finish the drop. On Linux that code can open a nested loop that processes other pending tasks, and one of those tasks can close the window and free the drag-and-drop object. The original code then keeps using that freed object, which is like reading a note after it has been shredded and the paper reused.

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.