Use after free in Chromoting (CVE-2026-76017)
A use-after-free was identified in Chrome Remote Desktop's host authenticator: a malformed authentication message can synchronously reject the session, destroying the authenticator object while code still holds a pointer to it. The report claims this gives a memory corruption primitive that could lead to remote code execution in the host process, though no working exploit was built.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Flapjack, 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 pre-authentication Use-After-Free (UAF) vulnerability exists in Chrome Remote Desktop's NegotiatingHostAuthenticator. During authentication setup, an invalid initial message can synchronously trigger session failure and object destruction during a nested callback. Upon returning from the callback, execution attempts to access members of the now-freed authenticator instance, creating an RCE primitive.
Affected files:
remoting/protocol/negotiating_host_authenticator.cc
Estimated timestamp from git blame: 2024-02-23
Summary
A potential Use-After-Free (UAF) vulnerability has been identified in NegotiatingHostAuthenticator::CreateAuthenticator within the Chrome Remote Desktop host (remoting_host). The vulnerability is triggered when an incoming authentication message is synchronously rejected during the initialization of an underlying authenticator. This synchronous rejection forces the immediate closure of the Jingle session, which deletes the NegotiatingHostAuthenticator instance. Execution then proceeds back up the stack to access a member variable of the freed this pointer.
Technical Details
In remoting/protocol/negotiating_host_authenticator.cc, the CreateAuthenticator method initializes underlying authenticators. For several negotiation paths, a resume_callback is executed synchronously before the function returns. If the execution of this callback results in the destruction of the session, a UAF occurs.
Below is a potential step-by-step execution flow an attacker could use to trigger the vulnerability. (Note: These are suggested steps based on static code analysis, as we do not have an actively running exploit proof-of-concept).
- An unauthenticated attacker connects to the host and sends a
session-initiateJingle signaling message. - In this message, they request the
SHARED_SECRET_SPAKE2_CURVE25519method, but intentionally provide a malformed payload (e.g., an empty<spake-message>). JingleSession::AcceptIncomingConnectionbegins processing the request and passes the message to a newly createdNegotiatingHostAuthenticator.NegotiatingHostAuthenticator::ProcessMessageselects the attacker's preferred method and callsCreateAuthenticator(), passing aresume_callbackthat wrapsProcessMessageInternal.CreateAuthenticatorhandles theSHARED_SECRET_SPAKE2_CURVE25519path (lines 183-188). It instantiatesSpake2Authenticator::CreateForHostand assigns it tothis->current_authenticator_.- At line 187, it synchronously invokes the callback:
std::move(resume_callback).Run();. - This executes
ProcessMessageInternal, which passes the malformed payload to the underlyingSpake2Authenticator::ProcessMessage. Spake2Authenticatorencounters the empty<spake-message>, sets its state toREJECTED, and fires its own state-update callbacks.- This rapidly propagates the
REJECTEDstate back toJingleSession::ContinueAcceptIncomingConnection, which immediately invokesClose(). Close()triggers a session failure cascade:ClientSession::OnConnectionClosedis called, which notifiesChromotingHost::OnSessionClosed.ChromotingHostsynchronously erases theClientSessionfrom its internal map, which deletes theJingleSessionobject and, finally, theNegotiatingHostAuthenticator(this).- The call stack unwinds back to
NegotiatingHostAuthenticator::CreateAuthenticatorat line 191:
191: ChainStateChangeAfterAcceptedWithUnderlying(*current_authenticator_);
- The execution dereferences
this->current_authenticator_on the freed object. This attempts to write abase::RepeatingCallbackto freed memory insideAuthenticator::ChainStateChangeAfterAcceptedWithUnderlying, providing a robust primitive for memory corruption and potential Remote Code Execution (RCE) in the unsandboxed host process.
Suggested Fix
Similar to how a previous vulnerability was fixed in the client-side equivalent (NegotiatingClientAuthenticator), NegotiatingHostAuthenticator::CreateAuthenticator should check if the object is still alive after invoking the resume_callback.
This can be safely implemented using base::WeakPtr:
auto weak_this = weak_factory_.GetWeakPtr();
std::move(resume_callback).Run();
if (!weak_this) {
return;
}
ChainStateChangeAfterAcceptedWithUnderlying(*current_authenticator_);
Evaluated with Chrome root at commit: 2155cb00003ec35716a76ed3246eae995f87b7ff
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, a callback invoked synchronously during authenticator creation can destroy the owning session and authenticator, but the code does not check that the object still exists before dereferencing it afterwards.
Impact
The report claims a memory corruption primitive that could lead to remote code execution in the unsandboxed host process, but this is based on static analysis only and no exploit was demonstrated.
What the attacker needed
Network access to the host; no authentication needed
The fix
The creation function should take a weak pointer before running the callback and return early if the object was destroyed, as was done for the client-side equivalent.
How it was found
- Connect to the host unauthenticated and send a session-initiate signalling message.
- Request the shared-secret SPAKE2 method with a malformed, empty authentication payload.
- The message reaches the host authenticator, which creates the underlying authenticator and runs its resume callback synchronously.
- The malformed payload is rejected, the session closes, and the authenticator object is deleted.
- Control returns to the creation function, which dereferences the freed object.
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 a program frees an object but keeps using it, that is a use-after-free: the memory may be reused by something else, so the old pointer now points at data the attacker can influence. Here, a bad login message makes the server tear down the session and delete the object mid-way through handling that same message, and the code then touches the deleted object. The report says this could let an attacker corrupt memory and possibly run their own code on the 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.