commit | a4c579c9a8e4e05f3b3ec012c40cb36c6ae89e11 | [log] [tgz] |
---|---|---|
author | Gastón Rodríguez <gastonr@microsoft.com> | Fri Jul 25 16:08:49 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jul 25 16:08:49 2025 |
tree | bdd4973c343052e1897c3aa965b3dca15a7bd0ee | |
parent | 3f1c9f3196f590dafeb54d9a14e6c8f292814218 [diff] |
Make DesktopDragDropClientWin a Window observer to avoid UAF If the renderer process crashes while a drag and drop is happening, the Window object for the source_window in DesktopDragDropClientWin::StartDragAndDrop will be freed. When the drag and drop is finished, the function will try to access the freed object, causing a use after free exception. This CL fixes this issue by temporarily adding the drag and drop client as an observer of the Window. The Window will notify it's observers when it's being destroyed, and with this we can avoid accessing the freed object. I was able to reproduce the crash following the steps in the linked bug, and stopped observing after the changes in this CL were implemented. Bug: 432497641 Change-Id: Ic05aadcd9005c9f5eb8b660a7d5a182b859e62eb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6779234 Reviewed-by: David Bienvenu <davidbienvenu@chromium.org> Reviewed-by: Robert Liao <robliao@chromium.org> Commit-Queue: Gaston Rodriguez <gastonr@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1492096}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.