Use after free in WebAuthentication (CVE-2026-10906)
A use-after-free occurs in Chromium's WebAuthentication passkey-reset flow when a synchronous callback deletes the object that then writes to a member variable. An attacker who can trigger the passkey-reset dialog and get the user to click 'Next' could cause a heap write to freed memory in the browser process.
Originally disclosed on Chrome VRP
- Fix shipped in 47 days
Steps to reproduce the problem
- Apply
change.diffto Chromium and compile with ASAN enabled - Start the PoC HTTP server:
python3 server.py(from thepoc/directory) - Run Chrome:
./out/asan/chrome --no-sandbox --gaia-url=http://localhost:8080 http://localhost:8080/ - Wait until the popup show, click the "Next" button, UAF occurs.
Problem Description
Introduction
Please note that this is the re-submit of issue 503013396, the new patch don't need to patch the CHECK in ~WebContents. And all the patch is made to show the popup, which doesn't influence the logic to trigger the UAF.
This is a security vulnerability in the browser process that does not rely on a compromised renderer, but it requires a essential user interaction. The change.diff file is used solely to simulate a GPM enclave passkey-reset flow without a real Google account(Just in order to show the popup in Chromium) and does not influence Chrome's original logic.
Bisect
This issue is introduced in this commit: 55e4d79e7a5923e18ab7f0a06107ac32e67f2035 This affect Stable 128.0.6613.84.
Patch Explanation
1. chrome_web_authentication_delegate.cc
BrowserProvidedPasskeysAvailable returns false when no account is signed in, blocking the enclave path. Change false → true to bypass this gate.
2. chrome_authenticator_request_delegate.cc
Invert HasPrimaryAccount → !HasPrimaryAccount so GPMEnclaveController is constructed when there is no account, instead of when there is one.
3. gpm_enclave_controller.cc
OnEnclaveLoaded normally fetches account state from Google's servers. Append a synchronous fake call to OnAccountStateDownloaded with kIrrecoverable state so the UI proceeds immediately without a real network response.
4. authenticator_request_dialog_model.cc
The kGPMTrustThisComputerCreation dialog calls GetGpmAccountEmail(), which CHECKs for a signed-in account. Replace the CHECK with a null guard so it returns "" instead of crashing.
5. authenticator_request_window.cc
- URLs → localhost:8080: so our server can trigger
MaybeRunCallbackvia HTTP redirect.
Additional Comments
Analysis
Vulnerability Summary
The vulnerability is a Use-After-Free (UAF) caused by the synchronous execution of a callback that deletes the this object. Subsequent write to a member variable of the deleted object results in memory corruption.
In MaybeRunCallback [1], std::move(callback_).Run(true) synchronously invokes OnPasskeysReset on the owning AuthenticatorRequestWindow. That call chain reaches CloseWindowAndDeleteSelf() [3], which executes delete this on AuthenticatorRequestWindow, destroying the passkey_reset_observer_ unique_ptr member [4] and freeing the PasskeyResetWebContentsObserver (i.e., this inside MaybeRunCallback). Control returns to MaybeRunCallback and the next line writes status_ = Status::kNotStarted [1] to the freed object, triggering a heap-use-after-free WRITE.
void MaybeRunCallback(const std::string& ref) {
if (status_ == Status::kStarted || ref.empty()) {
return;
}
if (status_ == Status::kSuccess && ref == "success") {
std::move(callback_).Run(true); //@audit: callback synchronously deletes |this|
} else if (status_ == Status::kFail && ref == "fail") {
std::move(callback_).Run(false);
}
status_ = Status::kNotStarted; //@audit: |this| has been freed, UAF WRITE occurs
}
The base::Unretained(this) comment at the callback binding site [4] incorrectly states that the observer's existence guarantees the owner's existence — but OnPasskeysReset is exactly the path that deletes the owner:
passkey_reset_observer_ =
std::make_unique<PasskeyResetWebContentsObserver>(
web_contents.get(),
// Unretained: `passkey_reset_observer_` is owned by this
// object so if it exists, this object also exists. //@audit: wrong; OnPasskeysReset deletes the owner
base::BindOnce(&AuthenticatorRequestWindow::OnPasskeysReset,
base::Unretained(this)));
Execution Path to Free:
The destruction path starts from callback_.Run(true) in MaybeRunCallback [1], which calls AuthenticatorRequestWindow::OnPasskeysReset [2], which calls model_->OnGPMPasskeysReset(true) [5], which calls model_->SetStep(kGPMCreatePin). SetStep synchronously iterates observers and calls OnStepTransition() [3] on AuthenticatorRequestWindow. Since the new step is not kGPMRecoverSecurityDomain, CloseWindowAndDeleteSelf() is called, executing delete this on AuthenticatorRequestWindow [3], which destroys the passkey_reset_observer_ unique_ptr [4], freeing PasskeyResetWebContentsObserver. Control returns to MaybeRunCallback line 157 where status_ = Status::kNotStarted writes to freed memory.
void OnPasskeysReset(bool success) { // [2]
if (model_) {
model_->OnGPMPasskeysReset(success);
}
}
void OnStepTransition() override { // [3]
if (model_->step() != step_) {
CloseWindowAndDeleteSelf();
}
}
void CloseWindowAndDeleteSelf() { // [3]
if (web_contents_weak_ptr_) {
web_contents_weak_ptr_->Close();
}
delete this; //@audit: destroys passkey_reset_observer_, freeing PasskeyResetWebContentsObserver
}
std::unique_ptr<PasskeyResetWebContentsObserver> passkey_reset_observer_; // [4]
void GPMEnclaveController::OnGPMPasskeysReset(bool success) { // [5]
CHECK(model_->step() == Step::kGPMRecoverSecurityDomain);
...
model_->SetStep(AuthenticatorRequestDialogModel::Step::kGPMCreatePin);
}
Summary
Security: Heap-use-after-free in PasskeyResetWebContentsObserver::MaybeRunCallback
Custom Questions
Type of crash:
browser
Crash state:
=================================================================
==2852092==ERROR: AddressSanitizer: heap-use-after-free on address 0x7bb8f865af30 at pc 0x55620e06b649 bp 0x7ffdb42babf0 sp 0x7ffdb42babe8
WRITE of size 4 at 0x7bb8f865af30 thread T0 (chrome)
#0 0x55620e06b648 in (anonymous namespace)::PasskeyResetWebContentsObserver::DidFinishNavigation(content::NavigationHandle*) chrome/browser/ui/webauthn/authenticator_request_window.cc:157:13
#1 0x7f795f56c314 in void content::WebContentsImpl::WebContentsObserverList::NotifyObservers<void (content::WebContentsObserver::*)(content::NavigationHandle*), content::NavigationHandle*&>(void (content::WebContentsObserver::*)(content::NavigationHandle*), content::NavigationHandle*&) content/browser/web_contents/web_contents_impl.h:1838:9
#2 0x7f795f56dbda in content::WebContentsImpl::DidFinishNavigation(content::NavigationHandle*) content/browser/web_contents/web_contents_impl.cc:7645:16
#3 0x7f795eb4c589 in content::NavigationRequest::~NavigationRequest() content/browser/renderer_host/navigation_request.cc:2424:20
#4 0x7f795eb53c2d in content::NavigationRequest::~NavigationRequest() content/browser/renderer_host/navigation_request.cc:2301:41
#5 0x7f795ec1719a in content::Navigator::DidNavigate(content::RenderFrameHostImpl*, content::mojom::DidCommitProvisionalLoadParams const&, std::__Cr::unique_ptr<content::NavigationRequest, std::__Cr::default_delete<content::NavigationRequest>>, bool, bool) gen/third_party/libc++/src/include/__memory/unique_ptr.h:74:5
#6 0x7f795eca1e6e in content::RenderFrameHostImpl::DidCommitNavigationInternal(std::__Cr::unique_ptr<content::NavigationRequest, std::__Cr::default_delete<content::NavigationRequest>>, mojo::StructPtr<content::mojom::DidCommitProvisionalLoadParams>, mojo::StructPtr<content::mojom::DidCommitSameDocumentNavigationParams>, base::TimeTicks const&) content/browser/renderer_host/render_frame_host_impl.cc:16456:58
#7 0x7f795eca3b76 in content::RenderFrameHostImpl::DidCommitSameDocumentNavigation(mojo::StructPtr<content::mojom::DidCommitProvisionalLoadParams>, mojo::StructPtr<content::mojom::DidCommitSameDocumentNavigationParams>) content/browser/renderer_host/render_frame_host_impl.cc:6604:8
#8 0x7f795c58a5e2 in content::mojom::FrameHostStubDispatch::Accept(content::mojom::FrameHost*, mojo::Message*) gen/content/common/frame.mojom.cc:5932:13
#9 0x7f797c394042 in mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:1085:54
#10 0x7f797c3ab300 in mojo::MessageDispatcher::Accept(mojo::Message*) mojo/public/cpp/bindings/lib/message_dispatcher.cc:51:24
#11 0x7f797c3998f4 in mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:747:20
#12 0x7f796da28cc7 in IPC::ChannelAssociatedGroupController::AcceptOnEndpointThread(mojo::Message, IPC::(anonymous namespace)::ScopedUrgentMessageNotification) ipc/ipc_mojo_bootstrap.cc:1199:24
#13 0x7f796da2af8d in base::internal::Invoker<base::internal::FunctorTraits<void (IPC::ChannelAssociatedGroupController::*&&)(mojo::Message, IPC::(anonymous namespace)::ScopedUrgentMessageNotification), IPC::ChannelAssociatedGroupController*&&, mojo::Message&&, IPC::(anonymous namespace)::ScopedUrgentMessageNotification&&>, base::internal::BindState<true, true, false, void (IPC::ChannelAssociatedGroupController::*)(mojo::Message, IPC::(anonymous namespace)::ScopedUrgentMessageNotification), scoped_refptr<IPC::ChannelAssociatedGroupController>, mojo::Message, IPC::(anonymous namespace)::ScopedUrgentMessageNotification>, void ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12
#14 0x7f797bbf6209 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) base/functional/callback.h:155:12
#15 0x7f797bc70750 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) base/task/common/task_annotator.h:112:5
#16 0x7f797bc6f726 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:336:40
#17 0x7f797be48449 in base::MessagePumpGlib::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_glib.cc:782:48
#18 0x7f797bc71da3 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:640:12
#19 0x7f797bb61652 in base::RunLoop::Run(base::Location const&) base/run_loop.cc:135:14
#20 0x7f795d775703 in content::BrowserMainLoop::RunMainMessageLoop() content/browser/browser_main_loop.cc:1103:18
#21 0x7f795d77d976 in content::BrowserMainRunnerImpl::Run() content/browser/browser_main_runner_impl.cc:151:15
#22 0x7f795d76cbb5 in content::BrowserMain(content::MainFunctionParams) content/browser/browser_main.cc:32:28
#23 0x7f7960c17715 in content::RunBrowserProcessMain(content::MainFunctionParams, content::ContentMainDelegate*) content/app/content_main_runner_impl.cc:696:10
#24 0x7f7960c1ae3d in content::ContentMainRunnerImpl::RunBrowser(content::MainFunctionParams, bool) content/app/content_main_runner_impl.cc:1320:10
#25 0x7f7960c1a396 in content::ContentMainRunnerImpl::Run() content/app/content_main_runner_impl.cc:1150:12
#26 0x7f7960c14ab3 in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) content/app/content_main.cc:356:36
#27 0x7f7960c14e3a in content::ContentMain(content::ContentMainParams) content/app/content_main.cc:369:10
#28 0x556207fbfb75 in ChromeMain chrome/app/chrome_main.cc:194:12
#29 0x7f790776c082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
0x7bb8f865af30 is located 32 bytes inside of 48-byte region [0x7bb8f865af10,0x7bb8f865af40)
freed by thread T0 (chrome) here:
#0 0x556207fbe822 in operator delete(void*, unsigned long) (/home/krace/fuzz/chromium/src/out/ui/chrome+0x67e9822) (BuildId: 6f42fc6d99176868)
#1 0x55620e06a134 in (anonymous namespace)::AuthenticatorRequestWindow::~AuthenticatorRequestWindow() gen/third_party/libc++/src/include/__memory/unique_ptr.h:74:5
#2 0x55620e06a25d in (anonymous namespace)::AuthenticatorRequestWindow::~AuthenticatorRequestWindow() chrome/browser/ui/webauthn/authenticator_request_window.cc:269:42
#3 0x55620e06a878 in (anonymous namespace)::AuthenticatorRequestWindow::OnStepTransition() chrome/browser/ui/webauthn/authenticator_request_window.cc:314:5
#4 0x55621038721a in AuthenticatorRequestDialogModel::SetStep(AuthenticatorRequestDialogModel::Step) chrome/browser/webauthn/authenticator_request_dialog_model.cc:178:14
#5 0x556210439ffe in GPMEnclaveController::OnGPMPasskeysReset(bool) chrome/browser/webauthn/gpm_enclave_controller.cc:1446:11
#6 0x5562103997ff in AuthenticatorRequestDialogModel::OnGPMPasskeysReset(bool) chrome/browser/webauthn/authenticator_request_dialog_model.cc:255:1
#7 0x55620e06b8f6 in base::internal::Invoker<base::internal::FunctorTraits<void ((anonymous namespace)::AuthenticatorRequestWindow::*&&)(bool), (anonymous namespace)::AuthenticatorRequestWindow*>, base::internal::BindState<true, true, false, void ((anonymous namespace)::AuthenticatorRequestWindow::*)(bool), base::internal::UnretainedWrapper<(anonymous namespace)::AuthenticatorRequestWindow, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void (bool)>::RunOnce(base::internal::BindStateBase*, bool) base/functional/bind_internal.h:740:12
#8 0x55620e06b3b5 in (anonymous namespace)::PasskeyResetWebContentsObserver::DidFinishNavigation(content::NavigationHandle*) base/functional/callback.h:155:12
#9 0x7f795f56c314 in void content::WebContentsImpl::WebContentsObserverList::NotifyObservers<void (content::WebContentsObserver::*)(content::NavigationHandle*), content::NavigationHandle*&>(void (content::WebContentsObserver::*)(content::NavigationHandle*), content::NavigationHandle*&) content/browser/web_contents/web_contents_impl.h:1838:9
#10 0x7f795f56dbda in content::WebContentsImpl::DidFinishNavigation(content::NavigationHandle*) content/browser/web_contents/web_contents_impl.cc:7645:16
#11 0x7f795eb4c589 in content::NavigationRequest::~NavigationRequest() content/browser/renderer_host/navigation_request.cc:2424:20
#12 0x7f795eb53c2d in content::NavigationRequest::~NavigationRequest() content/browser/renderer_host/navigation_request.cc:2301:41
#13 0x7f795ec1719a in content::Navigator::DidNavigate(content::RenderFrameHostImpl*, content::mojom::DidCommitProvisionalLoadParams const&, std::__Cr::unique_ptr<content::NavigationRequest, std::__Cr::default_delete<content::NavigationRequest>>, bool, bool) gen/third_party/libc++/src/include/__memory/unique_ptr.h:74:5
#14 0x7f795eca1e6e in content::RenderFrameHostImpl::DidCommitNavigationInternal(std::__Cr::unique_ptr<content::NavigationRequest, std::__Cr::default_delete<content::NavigationRequest>>, mojo::StructPtr<content::mojom::DidCommitProvisionalLoadParams>, mojo::StructPtr<content::mojom::DidCommitSameDocumentNavigationParams>, base::TimeTicks const&) content/browser/renderer_host/render_frame_host_impl.cc:16456:58
#15 0x7f795eca3b76 in content::RenderFrameHostImpl::DidCommitSameDocumentNavigation(mojo::StructPtr<content::mojom::DidCommitProvisionalLoadParams>, mojo::StructPtr<content::mojom::DidCommitSameDocumentNavigationParams>) content/browser/renderer_host/render_frame_host_impl.cc:6604:8
#16 0x7f795c58a5e2 in content::mojom::FrameHostStubDispatch::Accept(content::mojom::FrameHost*, mojo::Message*) gen/content/common/frame.mojom.cc:5932:13
#17 0x7f797c394042 in mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:1085:54
#18 0x7f797c3ab300 in mojo::MessageDispatcher::Accept(mojo::Message*) mojo/public/cpp/bindings/lib/message_dispatcher.cc:51:24
#19 0x7f797c3998f4 in mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:747:20
#20 0x7f796da28cc7 in IPC::ChannelAssociatedGroupController::AcceptOnEndpointThread(mojo::Message, IPC::(anonymous namespace)::ScopedUrgentMessageNotification) ipc/ipc_mojo_bootstrap.cc:1199:24
#21 0x7f796da2af8d in base::internal::Invoker<base::internal::FunctorTraits<void (IPC::ChannelAssociatedGroupController::*&&)(mojo::Message, IPC::(anonymous namespace)::ScopedUrgentMessageNotification), IPC::ChannelAssociatedGroupController*&&, mojo::Message&&, IPC::(anonymous namespace)::ScopedUrgentMessageNotification&&>, base::internal::BindState<true, true, false, void (IPC::ChannelAssociatedGroupController::*)(mojo::Message, IPC::(anonymous namespace)::ScopedUrgentMessageNotification), scoped_refptr<IPC::ChannelAssociatedGroupController>, mojo::Message, IPC::(anonymous namespace)::ScopedUrgentMessageNotification>, void ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12
#22 0x7f797bbf6209 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) base/functional/callback.h:155:12
#23 0x7f797bc70750 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) base/task/common/task_annotator.h:112:5
#24 0x7f797bc6f726 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:336:40
#25 0x7f797be48449 in base::MessagePumpGlib::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_glib.cc:782:48
#26 0x7f797bc71da3 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:640:12
#27 0x7f797bb61652 in base::RunLoop::Run(base::Location const&) base/run_loop.cc:135:14
#28 0x7f795d775703 in content::BrowserMainLoop::RunMainMessageLoop() content/browser/browser_main_loop.cc:1103:18
#29 0x7f795d77d976 in content::BrowserMainRunnerImpl::Run() content/browser/browser_main_runner_impl.cc:151:15
previously allocated by thread T0 (chrome) here:
#0 0x556207fbdc1d in operator new(unsigned long) (/home/krace/fuzz/chromium/src/out/ui/chrome+0x67e8c1d) (BuildId: 6f42fc6d99176868)
#1 0x55620e069193 in ShowAuthenticatorRequestWindow(content::WebContents*, AuthenticatorRequestDialogModel*) gen/third_party/libc++/src/include/__memory/unique_ptr.h:756:26
#2 0x556210386ea0 in AuthenticatorRequestDialogModel::SetStep(AuthenticatorRequestDialogModel::Step) chrome/browser/webauthn/authenticator_request_dialog_model.cc:170:7
#3 0x5562104356e3 in GPMEnclaveController::OnGPMTrustThisComputer() chrome/browser/webauthn/gpm_enclave_controller.cc:843:3
#4 0x55621039251c in AuthenticatorRequestDialogModel::OnGPMTrustThisComputer() chrome/browser/webauthn/authenticator_request_dialog_model.cc:255:1
#5 0x556215ca7951 in AuthenticatorRequestDialogView::Accept() chrome/browser/ui/views/webauthn/authenticator_request_dialog_view.cc:303:20
#6 0x7f7949df63e8 in views::DialogDelegate::AcceptDialog() ui/views/window/dialog_delegate.cc:576:34
#7 0x7f7949deeb13 in base::internal::Invoker<base::internal::FunctorTraits<void (views::DialogClientView::* const&)(ui::mojom::DialogButton, ui::Event const&), views::DialogClientView*, ui::mojom::DialogButton const&>, base::internal::BindState<true, true, false, void (views::DialogClientView::*)(ui::mojom::DialogButton, ui::Event const&), base::internal::UnretainedWrapper<views::DialogClientView, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, ui::mojom::DialogButton>, void (ui::Event const&)>::Run(base::internal::BindStateBase*, ui::Event const&) base/functional/bind_internal.h:740:12
#8 0x7f7949a88d0f in base::RepeatingCallback<void (ui::Event const&)>::Run(ui::Event const&) const & base/functional/callback.h:346:12
#9 0x7f7949a84196 in views::Button::NotifyClick(ui::Event const&) gen/third_party/libc++/src/include/variant:501:12
#10 0x7f7949a8c2dd in views::ButtonController::OnMouseReleased(ui::MouseEvent const&) ui/views/controls/button/button_controller.cc
#11 0x7f79767acfb4 in ui::ScopedTargetHandler::OnEvent(ui::Event*) ui/events/scoped_target_handler.cc:30:24
#12 0x7f797679439d in ui::EventDispatcher::DispatchEvent(ui::EventHandler*, ui::Event*) ui/events/event_dispatcher.cc:189:12
#13 0x7f7976792f9b in ui::EventDispatcher::ProcessEvent(ui::EventTarget*, ui::Event*) ui/events/event_dispatcher.cc:138:5
#14 0x7f7976792704 in ui::EventDispatcherDelegate::DispatchEventToTarget(ui::EventTarget*, ui::Event*) ui/events/event_dispatcher.cc:84:14
#15 0x7f797679223a in ui::EventDispatcherDelegate::DispatchEvent(ui::EventTarget*, ui::Event*) ui/events/event_dispatcher.cc:56:15
#16 0x7f7949d8a505 in views::internal::RootView::OnMouseReleased(ui::MouseEvent const&) ui/views/widget/root_view.cc:628:9
#17 0x7f7949dbcafb in views::Widget::OnMouseEvent(ui::MouseEvent*) ui/views/widget/widget.cc:2210:20
#18 0x7f7949e65d0c in views::NativeWidgetAura::OnMouseEvent(ui::MouseEvent*) ui/views/widget/native_widget_aura.cc
#19 0x7f797679439d in ui::EventDispatcher::DispatchEvent(ui::EventHandler*, ui::Event*) ui/events/event_dispatcher.cc:189:12
#20 0x7f7976792f9b in ui::EventDispatcher::ProcessEvent(ui::EventTarget*, ui::Event*) ui/events/event_dispatcher.cc:138:5
#21 0x7f7976792704 in ui::EventDispatcherDelegate::DispatchEventToTarget(ui::EventTarget*, ui::Event*) ui/events/event_dispatcher.cc:84:14
#22 0x7f797679223a in ui::EventDispatcherDelegate::DispatchEvent(ui::EventTarget*, ui::Event*) ui/events/event_dispatcher.cc:56:15
#23 0x7f797679aacf in ui::EventProcessor::OnEventFromSource(ui::Event*) ui/events/event_processor.cc:72:19
#24 0x7f797679e051 in ui::EventSource::DeliverEventToSink(ui::Event*) ui/events/event_source.cc:119:16
#25 0x7f797679d9f4 in ui::EventSource::SendEventToSinkFromRewriter(ui::Event const*, ui::EventRewriter const*) ui/events/event_source.cc:134:12
#26 0x7f79588cc67d in aura::WindowTreeHostPlatform::DispatchEvent(ui::Event*) ui/aura/window_tree_host_platform.cc:300:38
#27 0x7f7949e94bf8 in views::DesktopWindowTreeHostLinux::DispatchEvent(ui::Event*) ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc:250:29
#28 0x7f797cb7b527 in base::internal::Invoker<base::internal::FunctorTraits<void (ui::PlatformWindowDelegate::*&&)(ui::Event*), ui::PlatformWindowDelegate*>, base::internal::BindState<true, true, false, void (ui::PlatformWindowDelegate::*)(ui::Event*), base::internal::UnretainedWrapper<ui::PlatformWindowDelegate, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void (ui::Event*)>::RunOnce(base::internal::BindStateBase*, ui::Event*) base/functional/bind_internal.h:740:12
#29 0x7f79767b4c4a in ui::DispatchEventFromNativeUiEvent(ui::Event* const&, base::OnceCallback<void (ui::Event*)>) base/functional/callback.h:155:12
SUMMARY: AddressSanitizer: heap-use-after-free chrome/browser/ui/webauthn/authenticator_request_window.cc:157:13 in (anonymous namespace)::PasskeyResetWebContentsObserver::DidFinishNavigation(content::NavigationHandle*)
Shadow bytes around the buggy address:
0x7bb8f865ac80: f7 fa fd fd fd fd fd fa f7 fa fd fd fd fd fd fd
0x7bb8f865ad00: f7 fa fd fd fd fd fd fd f7 fa fd fd fd fd fd fd
0x7bb8f865ad80: f7 fa fd fd fd fd fd fd f7 fa fd fd fd fd fd fa
0x7bb8f865ae00: f7 fa fd fd fd fd fd fd f7 fa fd fd fd fd fd fd
0x7bb8f865ae80: f7 fa fd fd fd fd fd fa f7 fa fd fd fd fd fd fd
=>0x7bb8f865af00: f7 fa fd fd fd fd[fd]fd f7 fa fd fd fd fd fd fd
0x7bb8f865af80: f7 fa fd fd fd fd fd fa f7 fa fd fd fd fd fd fd
0x7bb8f865b000: f7 fa fd fd fd fd fd fa f7 fa fd fd fd fd fd fa
0x7bb8f865b080: f7 fa 00 00 00 00 00 00 f7 fa fd fd fd fd fd fd
0x7bb8f865b100: f7 fa 00 00 00 00 00 00 f7 fa fd fd fd fd fd fd
0x7bb8f865b180: f7 fa fd fd fd fd fd fa f7 fa fd fd fd fd fd fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==2852092==ADDITIONAL INFO
==2852092==Note: Please include this section with the ASan report.
Task trace:
#0 0x7f796da1df88 in IPC::ChannelAssociatedGroupController::Accept(mojo::Message*) ipc/ipc_mojo_bootstrap.cc:1138:13
#1 0x7f797a5ee84a in mojo::SimpleWatcher::Context::Notify(unsigned int, MojoHandleSignalsState, unsigned int) mojo/public/cpp/system/simple_watcher.cc:103:13
Command line: `./out/ui/chrome --no-sandbox --gaia-url=http://localhost:8080 --flag-switches-begin --enable-experimental-web-platform-features --flag-switches-end --ozone-platform=x11 http://localhost:8080/`
MiraclePtr Status: NOT PROTECTED
No raw_ptr<T> access to this region was detected prior to this crash.
This crash is still exploitable with MiraclePtr.
Refer to https://chromium.googlesource.com/chromium/src/+/main/base/memory/raw_ptr.md for details.
==2852092==END OF ADDITIONAL INFO
==2852092==ABORTING
Reporter credit:
Krace
Additional Data
Category: Security
Chrome Channel: Not sure
Regression: N/A \
Context
This is a browser-process use-after-free in Chrome's WebAuthentication UI, specifically in the code that drives the Google Password Manager (GPM) enclave passkey-reset flow. The affected object is PasskeyResetWebContentsObserver, a WebContentsObserver owned by AuthenticatorRequestWindow (both in an anonymous namespace in chrome/browser/ui/webauthn/authenticator_request_window.cc).
The bug does not rely on a compromised renderer, but it does require user interaction: the user has to click a button in the authenticator popup. The crash is a heap-use-after-free WRITE, reported as CVE-2026-10906, rated high severity, with a 3,000 USD bounty under the Chrome VRP. It was found by Weipeng Jiang (@Krace) of VRI and disclosed on 2026-06-02.
The report notes that this is a re-submission of issue 503013396, and that the new patch does not need to patch the CHECK in ~WebContents. All the patch does is make the popup appear; it does not influence the logic that triggers the UAF.
Setup
The researcher bisected the issue to commit [redacted], and states it affects Stable 128.0.6613.84.
The reproduction uses a patched Chromium build with ASAN enabled, plus a small PoC HTTP server. The patch (change.diff) exists only to simulate a GPM enclave passkey-reset flow without a real Google account, so that the popup can be shown in Chromium; it does not change Chrome's original logic.
The patch has five parts:
chrome_web_authentication_delegate.cc:BrowserProvidedPasskeysAvailablereturnsfalsewhen no account is signed in, which blocks the enclave path. The patch changesfalsetotrueto bypass this gate.chrome_authenticator_request_delegate.cc: invertsHasPrimaryAccountto!HasPrimaryAccount, soGPMEnclaveControlleris constructed when there is no account rather than when there is one.gpm_enclave_controller.cc:OnEnclaveLoadednormally fetches account state from Google's servers. The patch appends a synchronous fake call toOnAccountStateDownloadedwithkIrrecoverablestate, so the UI proceeds immediately without a real network response.authenticator_request_dialog_model.cc: thekGPMTrustThisComputerCreationdialog callsGetGpmAccountEmail(), which CHECKs for a signed-in account. The patch replaces the CHECK with a null guard so it returns""instead of crashing.authenticator_request_window.cc: URLs are pointed atlocalhost:8080, so the PoC server can triggerMaybeRunCallbackvia an HTTP redirect.
Finding it
The core observation is that MaybeRunCallback runs a callback synchronously, and that callback deletes the very object whose member MaybeRunCallback writes to afterwards. The base::Unretained(this) binding at the observer creation site is justified by a comment claiming that the observer's existence guarantees the owner's existence. That reasoning is wrong: OnPasskeysReset, the callback in question, is exactly the path that deletes the owner.
Exploitation
Step 1: build the patched browser
# Apply change.diff to Chromium and compile with ASAN enabled
The report gives this as a numbered instruction rather than a literal command: apply change.diff to Chromium and compile with ASAN enabled.
Step 2: start the PoC server
python3 server.py
Run from the poc/ directory. The server is what later triggers MaybeRunCallback through an HTTP redirect, because the patched build points the relevant URLs at localhost:8080.
Step 3: launch Chrome against the server
./out/asan/chrome --no-sandbox --gaia-url=http://localhost:8080 http://localhost:8080/
The command passes --gaia-url pointing at the local server and opens http://localhost:8080/ as the start page.
Step 4: interact and trigger the free
Wait until the popup appears, then click the "Next" button. The UAF occurs at that point.
The ASAN report was produced with a slightly different command line, which the report also records:
./out/ui/chrome --no-sandbox --gaia-url=http://localhost:8080 --flag-switches-begin --enable-experimental-web-platform-features --flag-switches-end --ozone-platform=x11 http://localhost:8080/
The execution path
The free starts in MaybeRunCallback:
void MaybeRunCallback(const std::string& ref) {
if (status_ == Status::kStarted || ref.empty()) {
return;
}
if (status_ == Status::kSuccess && ref == "success") {
std::move(callback_).Run(true); //@audit: callback synchronously deletes |this|
} else if (status_ == Status::kFail && ref == "fail") {
std::move(callback_).Run(false);
}
status_ = Status::kNotStarted; //@audit: |this| has been freed, UAF WRITE occurs
}
std::move(callback_).Run(true) synchronously invokes OnPasskeysReset on the owning AuthenticatorRequestWindow:
void OnPasskeysReset(bool success) { // [2]
if (model_) {
model_->OnGPMPasskeysReset(success);
}
}
That reaches GPMEnclaveController::OnGPMPasskeysReset, which checks the current step and moves the model to kGPMCreatePin:
void GPMEnclaveController::OnGPMPasskeysReset(bool success) { // [5]
CHECK(model_->step() == Step::kGPMRecoverSecurityDomain);
...
model_->SetStep(AuthenticatorRequestDialogModel::Step::kGPMCreatePin);
}
SetStep synchronously iterates observers and calls OnStepTransition() on AuthenticatorRequestWindow. Since the new step is not kGPMRecoverSecurityDomain, CloseWindowAndDeleteSelf() runs delete this:
void OnStepTransition() override { // [3]
if (model_->step() != step_) {
CloseWindowAndDeleteSelf();
}
}
void CloseWindowAndDeleteSelf() { // [3]
if (web_contents_weak_ptr_) {
web_contents_weak_ptr_->Close();
}
delete this; //@audit: destroys passkey_reset_observer_, freeing PasskeyResetWebContentsObserver
}
Deleting the window destroys the unique_ptr member that owns the observer:
std::unique_ptr<PasskeyResetWebContentsObserver> passkey_reset_observer_; // [4]
Control then returns to MaybeRunCallback, and the line status_ = Status::kNotStarted writes to the freed PasskeyResetWebContentsObserver. The report's line references are: [1] authenticator_request_window.cc line 148, [2] line 323, [3] line 301, [4] line 221, and [5] gpm_enclave_controller.cc line 1437.
The binding site that makes this possible carries the incorrect justification:
passkey_reset_observer_ =
std::make_unique<PasskeyResetWebContentsObserver>(
web_contents.get(),
// Unretained: `passkey_reset_observer_` is owned by this
// object so if it exists, this object also exists. //@audit: wrong; OnPasskeysReset deletes the owner
base::BindOnce(&AuthenticatorRequestWindow::OnPasskeysReset,
base::Unretained(this)));
The ASAN output
The crash is reported at authenticator_request_window.cc:157:13, inside PasskeyResetWebContentsObserver::DidFinishNavigation, as a WRITE of size 4 into a 48-byte region, 32 bytes inside it. The freed-by stack shows the destruction chain: AuthenticatorRequestWindow::~AuthenticatorRequestWindow() called from OnStepTransition() (line 314), called from AuthenticatorRequestDialogModel::SetStep (line 178), called from GPMEnclaveController::OnGPMPasskeysReset (line 1446), called from AuthenticatorRequestDialogModel::OnGPMPasskeysReset (line 255), called from the bound AuthenticatorRequestWindow::OnPasskeysReset callback, called from PasskeyResetWebContentsObserver::DidFinishNavigation.
The allocation stack shows the window being created by ShowAuthenticatorRequestWindow from AuthenticatorRequestDialogModel::SetStep (line 170), reached from GPMEnclaveController::OnGPMTrustThisComputer (line 843), from AuthenticatorRequestDialogModel::OnGPMTrustThisComputer, from AuthenticatorRequestDialogView::Accept() (line 303), from views::DialogDelegate::AcceptDialog(), from the mouse-release handling of the dialog button. In other words, the window is allocated when the user accepts the "trust this computer" dialog, and freed when the passkey reset moves the model to a new step.
The report's additional info states MiraclePtr Status: NOT PROTECTED, that no raw_ptr<T> access to the region was detected prior to the crash, and that the crash is still exploitable with MiraclePtr.
Root cause
MaybeRunCallback assumes the callback it runs cannot destroy its own object, and writes status_ after the callback returns. The callback chain (OnPasskeysReset to OnGPMPasskeysReset to SetStep to OnStepTransition to CloseWindowAndDeleteSelf) does destroy the owner, and with it the PasskeyResetWebContentsObserver that is executing. The base::Unretained(this) binding is safe only under the assumption stated in the comment, and that assumption is false for this path. The write after the callback is therefore a write to freed memory.
Impact
The report describes a heap-use-after-free WRITE in the browser process, reachable without a compromised renderer but requiring user interaction (clicking the button in the popup). The report does not describe a concrete exploitation primitive beyond the memory corruption itself.
Fix
The report does not describe the fix that was applied. It only notes that the re-submitted patch does not need to patch the CHECK in ~WebContents, and that the patch used for reproduction is limited to making the popup appear.
Variants to test
- Look for other
base::Unretained(this)bindings where the callback can reach a path that deletes the owning object, such as step-transition observers that close and delete their window. A positive result is an ASAN report showing the free inside the callback and a later access to the same object. - Look for
std::move(callback_).Run(...)followed by any member write, in observer classes owned by UI objects that can delete themselves on state change. A positive result is a write to a freed region in the same stack frame as the callback invocation. - Look for comments asserting an ownership invariant ("if it exists, this object also exists") and check whether any callback bound with
Unretainedbreaks that invariant. A positive result is a path where the callback destroys the owner before returning. - Check whether MiraclePtr or
raw_ptrprotects the affected member; the report notes this crash is still exploitable with MiraclePtr, so a similar bug in araw_ptr-protected field may still be reachable.
What happened, in plain words
Chrome has a feature that lets you sign in to websites without typing a password, using something called a passkey. Passkeys are managed through Google Password Manager (GPM), and there is a flow for resetting a passkey when something goes wrong. That flow shows a small popup window in the browser.
This report describes a bug in that popup code. When the user clicks a button, Chrome runs a piece of code that is supposed to tidy up and then record that it has finished. But the tidy-up step actually throws away the whole object that is running the code, including the part that is about to record the result. The code then writes to memory that no longer belongs to it. In programming terms this is a use-after-free: using something after it has been freed. It is a memory-safety bug in the browser process, the part of Chrome with the most privileges, so it is taken seriously.
The bug does not need a malicious website to have already broken out of its sandbox (the isolated environment a web page runs in). It does need the user to click a button in the popup. The crash was found by Weipeng Jiang (@Krace) of VRI, rated high severity, paid a 3,000 USD bounty under the Chrome VRP, and disclosed on 2026-06-02 as CVE-2026-10906.
Context
The product and the feature
Chrome is a web browser. Inside it, a web page runs in a restricted process called the renderer. The browser process is the main process that controls windows, menus, network access and the user interface. If an attacker can corrupt memory in the browser process, the consequences are much worse than corrupting a single web page, because the browser process is not sandboxed the same way.
WebAuthentication is the browser feature behind passkeys and security keys. A passkey is a credential stored for you that lets a site verify it is really you without a password. Google Password Manager (GPM) can store passkeys, and some of them live in a secure server-side component called an enclave. The enclave passkey-reset flow is the sequence of screens shown when a passkey needs to be reset.
The popup that appears during that flow is driven by a class called AuthenticatorRequestWindow. A class is a blueprint for an object: it bundles data and the functions that operate on that data. AuthenticatorRequestWindow owns another object, PasskeyResetWebContentsObserver, whose job is to watch a web page (a WebContents) and be told when things happen to it, such as a navigation finishing. This pattern, an object that watches another and gets notified, is called an observer. Both classes live in an anonymous namespace in chrome/browser/ui/webauthn/authenticator_request_window.cc. An anonymous namespace is a C++ way of saying "these names are private to this file".
The bug in one sentence
The affected object is PasskeyResetWebContentsObserver. It is owned by AuthenticatorRequestWindow. A callback (a function passed along to be called later) runs synchronously, meaning it finishes completely before the next line of the caller runs, and that callback deletes the window, which in turn deletes the observer. The observer then writes to its own memory, which has already been freed.
What the report says about the submission
The report notes that this is a re-submission of issue 503013396, and that the new patch does not need to patch the CHECK in ~WebContents. A CHECK is an assertion: a line that deliberately crashes the program if a condition is not true, used to catch programmer mistakes early. All the patch does is make the popup appear; it does not influence the logic that triggers the use-after-free.
Setup
Finding the version
The researcher bisected the issue to commit [redacted], and states it affects Stable 128.0.6613.84. A bisect is a way of finding which code change introduced a bug: you test versions in the middle of a range, narrow down which half contains the change, and repeat until you find the exact commit. A commit is a recorded change to the source code, identified by a long hexadecimal string.
Why a patched build is needed
The reproduction uses a patched Chromium build with ASAN enabled, plus a small PoC HTTP server. ASAN stands for AddressSanitizer, a tool built into the compiler that adds checks around memory accesses and reports when code reads or writes memory that has been freed. A PoC, or proof of concept, is a minimal setup that demonstrates the bug. Chromium is the open-source project Chrome is built from.
The patch (change.diff) exists only to simulate a GPM enclave passkey-reset flow without a real Google account, so that the popup can be shown in Chromium; it does not change Chrome's original logic. In other words, the patch lets the popup be shown without a real Google account signed in, while leaving the buggy code path untouched. The patch removes that refusal so the popup can be reached, while leaving the buggy code path untouched.
The five parts of the patch
chrome_web_authentication_delegate.cc:BrowserProvidedPasskeysAvailablereturnsfalsewhen no account is signed in, which blocks the enclave path. The patch changesfalsetotrueto bypass this gate. Think of it as a bouncer who turns you away because you are not on the list; the patch tells the bouncer to let everyone in.chrome_authenticator_request_delegate.cc: invertsHasPrimaryAccountto!HasPrimaryAccount, soGPMEnclaveControlleris constructed when there is no account rather than when there is one. The!means "not", so the condition is flipped.gpm_enclave_controller.cc:OnEnclaveLoadednormally fetches account state from Google's servers. The patch appends a synchronous fake call toOnAccountStateDownloadedwithkIrrecoverablestate, so the UI proceeds immediately without a real network response. This is like pretending the postman has already delivered the letter so you can carry on reading it.authenticator_request_dialog_model.cc: thekGPMTrustThisComputerCreationdialog callsGetGpmAccountEmail(), which CHECKs for a signed-in account. The patch replaces the CHECK with a null guard so it returns""instead of crashing. A null guard is a check that handles the case where there is no value, returning an empty string rather than aborting.authenticator_request_window.cc: URLs are pointed atlocalhost:8080, so the PoC server can triggerMaybeRunCallbackvia an HTTP redirect.localhostmeans this computer, and8080is a port number, a numbered door on the machine where a server listens. An HTTP redirect is a server response that tells the browser to go to a different address.
Finding it
The core observation is that MaybeRunCallback runs a callback synchronously, and that callback deletes the very object whose member MaybeRunCallback writes to afterwards. The base::Unretained(this) binding at the observer creation site is justified by a comment claiming that the observer's existence guarantees the owner's existence. That reasoning is wrong: OnPasskeysReset, the callback in question, is exactly the path that deletes the owner.
base::Unretained(this) is a way of binding a member function to an object without making the binding keep the object alive. Normally, when you pass a callback around, you want some guarantee that the object still exists when the callback runs. Unretained says: do not worry, I promise the object will still be there. The comment in the code is that promise. The bug is that the promise is false.
Exploitation
Step 1: build the patched browser
# Apply change.diff to Chromium and compile with ASAN enabled
The report gives this as a numbered instruction rather than a literal command: apply change.diff to Chromium and compile with ASAN enabled. Compiling means turning source code into a runnable program. ASAN is switched on so that the moment the program touches freed memory, it stops and prints a detailed report instead of silently carrying on.
Step 2: start the PoC server
python3 server.py
Run from the poc/ directory. The server is what later triggers MaybeRunCallback through an HTTP redirect, because the patched build points the relevant URLs at localhost:8080. In plain terms, the researcher wrote a tiny web server that answers requests on this machine and, at the right moment, sends the browser to a new address. That navigation is what makes the observer's navigation-finished handler run.
Step 3: launch Chrome against the server
./out/asan/chrome --no-sandbox --gaia-url=http://localhost:8080 http://localhost:8080/
The command points --gaia-url at the local server and opens http://localhost:8080/ as the start page. Gaia is Google's account system; pointing its URL at the local server means Chrome talks to the researcher's fake server instead of Google. --no-sandbox turns off the sandbox for this test build, which is common when debugging. The final argument is the page Chrome opens on startup.
Step 4: interact and trigger the free
Wait until the popup appears, then click the "Next" button. The UAF occurs at that point. This is the user interaction the report mentions: the UAF occurs after the popup appears and the "Next" button is clicked.
The ASAN report was produced with a slightly different command line, which the report also records:
./out/ui/chrome --no-sandbox --gaia-url=http://localhost:8080 --flag-switches-begin --enable-experimental-web-platform-features --flag-switches-end --ozone-platform=x11 http://localhost:8080/
This is the same idea with a few extra switches: the binary is in out/ui rather than out/asan, experimental web platform features are enabled, and the windowing system is forced to X11, a common display system on Linux.
The execution path
The free starts in MaybeRunCallback:
void MaybeRunCallback(const std::string& ref) {
if (status_ == Status::kStarted || ref.empty()) {
return;
}
if (status_ == Status::kSuccess && ref == "success") {
std::move(callback_).Run(true); //@audit: callback synchronously deletes |this|
} else if (status_ == Status::kFail && ref == "fail") {
std::move(callback_).Run(false);
}
status_ = Status::kNotStarted; //@audit: |this| has been freed, UAF WRITE occurs
}
Line by line:
void MaybeRunCallback(const std::string& ref)declares a function that takes a piece of text,ref, and returns nothing. The name suggests it may or may not run a callback depending on the situation.if (status_ == Status::kStarted || ref.empty())checks whether the operation is already in progress, or whetherrefis empty. If either is true, the function returns early and does nothing.if (status_ == Status::kSuccess && ref == "success")checks whether the operation succeeded and the reference text is exactlysuccess.std::move(callback_).Run(true);takes the stored callback and runs it withtrue. The comment marks this as the audit point: the callback synchronously deletesthis, the object the function is running on.else if (status_ == Status::kFail && ref == "fail")handles the failure case, running the callback withfalse.status_ = Status::kNotStarted;resets the status. The comment marks this as the use-after-free write:thishas already been freed by the callback, so this line writes into freed memory.
std::move(callback_).Run(true) synchronously invokes OnPasskeysReset on the owning AuthenticatorRequestWindow:
void OnPasskeysReset(bool success) { // [2]
if (model_) {
model_->OnGPMPasskeysReset(success);
}
}
This function receives the success flag. If the window still has a model (the object holding the state of the dialog), it forwards the call to model_->OnGPMPasskeysReset(success). The model_ pointer is the window's link to the shared state.
That reaches GPMEnclaveController::OnGPMPasskeysReset, which checks the current step and moves the model to kGPMCreatePin:
void GPMEnclaveController::OnGPMPasskeysReset(bool success) { // [5]
CHECK(model_->step() == Step::kGPMRecoverSecurityDomain);
...
model_->SetStep(AuthenticatorRequestDialogModel::Step::kGPMCreatePin);
}
CHECK(model_->step() == Step::kGPMRecoverSecurityDomain);asserts that the dialog is currently at the recover-security-domain step. If it is not, the program aborts. This is a sanity check, not the bug....stands for code the report elides.model_->SetStep(AuthenticatorRequestDialogModel::Step::kGPMCreatePin);moves the dialog to the create-PIN step. Changing the step is what notifies the observers.
SetStep synchronously iterates observers and calls OnStepTransition() on AuthenticatorRequestWindow. Since the new step is not kGPMRecoverSecurityDomain, CloseWindowAndDeleteSelf() runs delete this:
void OnStepTransition() override { // [3]
if (model_->step() != step_) {
CloseWindowAndDeleteSelf();
}
}
void CloseWindowAndDeleteSelf() { // [3]
if (web_contents_weak_ptr_) {
web_contents_weak_ptr_->Close();
}
delete this; //@audit: destroys passkey_reset_observer_, freeing PasskeyResetWebContentsObserver
}
void OnStepTransition() overrideis the observer's notification that the step changed.overridemeans it replaces a function declared in a base class.if (model_->step() != step_)checks whether the model's step differs from the step the window last recorded.CloseWindowAndDeleteSelf();is called when it does. This is the crucial line: the window decides it is no longer needed.void CloseWindowAndDeleteSelf()first closes the associated web contents if it still has a weak pointer to it. A weak pointer is a reference that does not keep the object alive; it lets you check whether the object still exists.delete this;destroys the window object itself. The comment marks the consequence: destroying the window destroyspasskey_reset_observer_, which frees thePasskeyResetWebContentsObserver.
Deleting the window destroys the unique_ptr member that owns the observer:
std::unique_ptr<PasskeyResetWebContentsObserver> passkey_reset_observer_; // [4]
A unique_ptr is a smart pointer that owns exactly one object and deletes it automatically when the pointer goes away. So when the window is deleted, this member is destroyed, and the observer it points to is deleted too.
Control then returns to MaybeRunCallback, and the line status_ = Status::kNotStarted writes to the freed PasskeyResetWebContentsObserver. The report's line references are: [1] authenticator_request_window.cc line 148, [2] line 323, [3] line 301, [4] line 221, and [5] gpm_enclave_controller.cc line 1437.
The binding site that makes this possible carries the incorrect justification:
passkey_reset_observer_ =
std::make_unique<PasskeyResetWebContentsObserver>(
web_contents.get(),
// Unretained: `passkey_reset_observer_` is owned by this
// object so if it exists, this object also exists. //@audit: wrong; OnPasskeysReset deletes the owner
base::BindOnce(&AuthenticatorRequestWindow::OnPasskeysReset,
base::Unretained(this)));
passkey_reset_observer_ =assigns a newly created observer to the member.std::make_unique<PasskeyResetWebContentsObserver>(creates the observer and gives ownership to aunique_ptr.web_contents.get(),passes the web contents the observer should watch.- The comment claims that because the observer is owned by the window, if the observer exists then the window exists. The audit note says this is wrong: the callback
OnPasskeysResetdeletes the owner. base::BindOnce(&AuthenticatorRequestWindow::OnPasskeysReset,prepares a callback that will call the window'sOnPasskeysResetonce.base::Unretained(this)));binds the current window without keeping it alive, relying on the comment's promise.
The ASAN output
The crash is reported at authenticator_request_window.cc:157:13, inside PasskeyResetWebContentsObserver::DidFinishNavigation, as a WRITE of size 4 into a 48-byte region, 32 bytes inside it. In plain words, the program tried to write four bytes into the middle of a block of memory that had already been handed back to the allocator. The allocator is the part of the runtime that hands out and reclaims memory.
The freed-by stack shows the destruction chain: AuthenticatorRequestWindow::~AuthenticatorRequestWindow() called from OnStepTransition() (line 314), called from AuthenticatorRequestDialogModel::SetStep (line 178), called from GPMEnclaveController::OnGPMPasskeysReset (line 1446), called from AuthenticatorRequestDialogModel::OnGPMPasskeysReset (line 255), called from the bound AuthenticatorRequestWindow::OnPasskeysReset callback, called from PasskeyResetWebContentsObserver::DidFinishNavigation. A stack trace is a list of the function calls that led to a point in the program, like a receipt showing every step of a journey.
The allocation stack shows the window being created by ShowAuthenticatorRequestWindow from AuthenticatorRequestDialogModel::SetStep (line 170), reached from GPMEnclaveController::OnGPMTrustThisComputer (line 843), from AuthenticatorRequestDialogModel::OnGPMTrustThisComputer, from AuthenticatorRequestDialogView::Accept() (line 303), from views::DialogDelegate::AcceptDialog(), from the mouse-release handling of the dialog button. In other words, the window is allocated when the user accepts the "trust this computer" dialog, and freed when the passkey reset moves the model to a new step. The same object is created when the user accepts the "trust this computer" dialog and destroyed when the passkey reset moves the model to a new step.
The report's additional info states MiraclePtr Status: NOT PROTECTED, that no raw_ptr<T> access to the region was detected prior to the crash, and that the crash is still exploitable with MiraclePtr. MiraclePtr is a Chrome mitigation that makes some use-after-free bugs harder to exploit by protecting raw pointers to freed objects. raw_ptr is a pointer type that participates in that protection. Here the affected memory is not covered by it, so the mitigation does not help.
Root cause
MaybeRunCallback assumes the callback it runs cannot destroy its own object, and writes status_ after the callback returns. The callback chain (OnPasskeysReset to OnGPMPasskeysReset to SetStep to OnStepTransition to CloseWindowAndDeleteSelf) does destroy the owner, and with it the PasskeyResetWebContentsObserver that is executing. The base::Unretained(this) binding is safe only under the assumption stated in the comment, and that assumption is false for this path. The write after the callback is therefore a write to freed memory.
A useful everyday comparison: imagine a shop assistant who promises to lock up after serving you, then hands you the keys and walks out. The next instruction, "turn off the lights", is given to a shop that is already closed and empty. The code does the equivalent: it calls a function that closes the shop, then tries to switch off a light in the closed shop.
Impact
The report describes a heap-use-after-free WRITE in the browser process, reachable without a compromised renderer but requiring user interaction (clicking the button in the popup). The report does not describe a concrete exploitation primitive beyond the memory corruption itself. In other words, the report proves the memory corruption happens; it does not show a full attack that turns that corruption into code execution or data theft.
Fix
It only notes that the re-submitted patch does not need to patch the CHECK in ~WebContents, and that the patch used for reproduction is limited to making the popup appear.
Variants to test
- Look for other
base::Unretained(this)bindings where the callback can reach a path that deletes the owning object, such as step-transition observers that close and delete their window. A positive result is an ASAN report showing the free inside the callback and a later access to the same object. - Look for
std::move(callback_).Run(...)followed by any member write, in observer classes owned by UI objects that can delete themselves on state change. A positive result is a write to a freed region in the same stack frame as the callback invocation. A stack frame is the slice of memory holding one function call's local state. - Look for comments asserting an ownership invariant ("if it exists, this object also exists") and check whether any callback bound with
Unretainedbreaks that invariant. A positive result is a path where the callback destroys the owner before returning. - Check whether MiraclePtr or
raw_ptrprotects the affected member; the report notes this crash is still exploitable with MiraclePtr, so a similar bug in araw_ptr-protected field may still be reachable.
Glossary
- ASAN (AddressSanitizer): a compiler tool that detects memory errors such as reading or writing freed memory and prints a detailed report.
- Anonymous namespace: a C++ construct that makes names private to the file they are declared in.
- Base class: a class that another class builds on; the derived class can override its functions.
- Bisect: a method of finding the change that introduced a bug by testing the middle of a range and narrowing down.
- Browser process: the main Chrome process that controls windows, UI and network access, with more privileges than a web page.
- Callback: a function passed to another piece of code to be called later.
- CHECK: an assertion that aborts the program if a condition is false, used to catch programmer errors.
- Chromium: the open-source browser project that Chrome is built from.
- Commit: a recorded change to source code, identified by a hash.
- Compile: turn source code into a runnable program.
- CVE: a public identifier for a security vulnerability.
- Enclave: a secure server-side component used by Google Password Manager for some passkeys.
- Gaia: Google's account system.
- GPM (Google Password Manager): Google's password and passkey manager.
- Heap: the area of memory used for objects created while a program runs.
- Heap-use-after-free: using memory after it has been freed back to the allocator.
- HTTP redirect: a server response telling the browser to go to a different address.
- localhost: the name for the computer you are using.
- MiraclePtr: a Chrome mitigation that makes some use-after-free bugs harder to exploit.
- Model: an object holding the shared state of a dialog or UI.
- Null guard: a check that handles the absence of a value instead of crashing.
- Observer: an object that watches another and is notified when something happens to it.
- Passkey: a credential that lets a site verify you without a password.
- PoC (proof of concept): a minimal setup that demonstrates a bug.
- Port: a numbered door on a machine where a server listens.
- raw_ptr: a Chrome pointer type that participates in memory-safety mitigations.
- Renderer: the restricted process in which a web page runs.
- Sandbox: an isolated environment that limits what a process can do.
- Stack frame: the memory holding one function call's local state.
- Stack trace: a list of function calls that led to a point in the program.
- Synchronous: running to completion before the next line of the caller runs.
- unique_ptr: a smart pointer that owns one object and deletes it when the pointer goes away.
- Unretained: a binding that does not keep an object alive, relying on a promise that it still exists.
- Use-after-free: using an object after it has been destroyed.
- VRP (Vulnerability Reward Program): a programme that pays researchers for reporting security bugs.
- Weak pointer: a reference that does not keep an object alive and can be checked.
- WebAuthentication: the browser feature behind passkeys and security keys.
- WebContents: Chrome's object representing a web page and its contents.
- X11: a display system commonly used on Linux.