Use after free in Chromoting (CVE-2026-13779)
A use-after-free flaw exists in NegotiatingClientAuthenticator when the secret-fetching callback runs synchronously, as in the Boca Spotlight feature. A malicious host can send a crafted session-accept message that triggers synchronous destruction of the authenticator, leading to memory corruption in the unsandboxed browser process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 48 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 without the Chrome Security team. 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 NegotiatingClientAuthenticator when used with synchronous secret fetching, such as in the Boca Spotlight feature on ChromeOS. A malicious host can trigger synchronous object destruction during the authentication handshake, leading to memory corruption in the unsandboxed ash-chrome process. This issue is reachable pre-authentication via a crafted signaling message.
Affected files:
remoting/protocol/negotiating_client_authenticator.ccremoting/protocol/negotiating_authenticator_base.hremoting/protocol/authenticator.ccremoting/protocol/authenticator.h
Estimated timestamp from git blame: 2024-02-23
Summary
A potential Use-After-Free (UAF) vulnerability has been identified in NegotiatingClientAuthenticator::CreateAuthenticatorForCurrentMethod. The vulnerability occurs when the config_.fetch_secret_callback is executed synchronously, which is the case in the Boca Spotlight client implementation. A malicious host can craft a signaling message that causes the authenticator to be destroyed while its methods are still active on the execution stack.
Root Cause Analysis
In remoting/protocol/negotiating_client_authenticator.cc, the function CreateAuthenticatorForCurrentMethod invokes config_.fetch_secret_callback.Run(). In the Boca Spotlight feature, this callback is synchronous and immediately executes the provided SecretFetchedCallback.
An attacker acting as a malicious host can trigger the following synchronous call chain:
- The host sends a
session-acceptmessage that selectsSHARED_SECRET_SPAKE2_CURVE25519but lacks a required host certificate. NegotiatingClientAuthenticator::ProcessMessageinitiatesCreateAuthenticatorForCurrentMethod.- The synchronous
fetch_secret_callbackcreates aSpake2Authenticatorand runs itsProcessMessagemethod. Spake2Authenticatorsynchronously rejects the connection due to the missing certificate.- This rejection triggers a synchronous state change in
JingleSession, which notifiesRemotingClient. RemotingClient::StopSessionis called, which executesconnection_.reset(), synchronously destroying theWebrtcConnectionToHost, theJingleSession, and theNegotiatingClientAuthenticator(this).
Upon returning from the callback in CreateAuthenticatorForCurrentMethod, the code attempts to execute line 148:
ChainStateChangeAfterAcceptedWithUnderlying(*current_authenticator_);
At this point, this has been freed, leading to a UAF read of the current_authenticator_ pointer and a subsequent UAF write as a base::RepeatingClosure is assigned into the memory of the already-freed sub-authenticator.
Potential Impact
This vulnerability allows for memory corruption in the unsandboxed ash-chrome browser process on ChromeOS. As a pre-authentication vulnerability reachable via signaling messages, it represents a significant security risk. Successful exploitation could lead to remote code execution (RCE) with the privileges of the browser process.
Suggested Attack Steps
An attacker would likely follow these steps to trigger the issue:
- Compromise a device that can act as a host in a Boca Spotlight session (e.g., a student device).
- Wait for a teacher device to initiate a Spotlight session.
- Respond to the
session-initiatemessage with a craftedsession-acceptmessage that specifies SPAKE2 authentication but omits the certificate field. - The teacher's client process should then encounter the UAF during the synchronous rejection handling.
Recommended Fix
To mitigate this risk, NegotiatingClientAuthenticator should ensure it remains valid after the callback returns. Using a base::WeakPtr to check if this is still valid before dereferencing members or, ideally, ensuring that the fetch_secret_callback always executes asynchronously would prevent the synchronous teardown from occurring while the object is on the stack.
Note: These findings are based on code analysis and have not been verified with a functional proof-of-concept.
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
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
The code calls a callback that can synchronously destroy the object (this) while its methods are still on the stack, leading to a use-after-free when the method later accesses members.
Impact
Successful exploitation could lead to remote code execution with the privileges of the browser process, but the report notes the findings are based on code analysis and have not been verified with a functional proof-of-concept.
What the attacker needed
Compromised host device; teacher initiates session; crafted session-accept message
The fix
The authenticator should use a base::WeakPtr to check validity after the callback, or the callback should always run asynchronously to prevent synchronous teardown.
How it was found
- Compromise a device that can act as a host in a Boca Spotlight session.
- Wait for a teacher device to initiate a Spotlight session.
- Respond to the session-initiate message with a crafted session-accept message that specifies SPAKE2 authentication but omits the certificate field.
- The teacher's client process encounters the use-after-free during the synchronous rejection handling.
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.
A use-after-free happens when a program keeps using a piece of memory after it has been freed, which can let an attacker control what happens next. Here, a malicious host sends a special message during a connection handshake that causes the client to destroy an object while it is still being used, potentially allowing the attacker to run code on the victim's machine.
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.