Use after free in QUIC (CVE-2026-9114)
A use-after-free flaw in Chrome's QUIC implementation allows a malicious proxy to trigger a dangling pointer dereference by sending a GOAWAY frame followed by a DATAGRAM frame, potentially leading to remote code execution in the network process. The issue arises because the datagram visitor pointer is not cleared when the stream handle is detached.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 57 days
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A Use-After-Free exists in the network process when an HTTP/3 GOAWAY frame causes a stream handle to detach without unregistering its datagram visitor. This leaves a dangling, unprotected raw pointer in QuicSpdyStream that is dereferenced when a subsequent DATAGRAM frame is received, potentially allowing for remote code execution.
Affected files:
net/quic/quic_chromium_client_stream.ccnet/quic/quic_proxy_datagram_client_socket.ccnet/third_party/quiche/src/quiche/quic/core/http/quic_spdy_stream.ccnet/quic/quic_chromium_client_session.cc
Estimated timestamp from git blame: 2025-10-08
Description
A potential Use-After-Free (UAF) vulnerability exists in the Chrome network process when using CONNECT-UDP (MASQUE) or IP Protection proxies. The issue arises from a lifecycle mismatch between QuicProxyDatagramClientSocket and QuicSpdyStream when an HTTP/3 GOAWAY frame is received.
Technical Details
-
Visitor Registration:
QuicProxyDatagramClientSocketregisters itself as anHttp3DatagramVisitoron an underlyingQuicSpdyStreamusing aQuicChromiumClientStream::Handle. This registration stores a raw pointer to the socket inQuicSpdyStream::datagram_visitor_(defined innet/third_party/quiche/src/quiche/quic/core/http/quic_spdy_stream.h). -
H3 GOAWAY Processing: When a proxy sends an HTTP/3 GOAWAY frame,
QuicChromiumClientSession::OnHttp3GoAwayis triggered. This function callsOnErroron all active streams affected by the GOAWAY. For a CONNECT-UDP stream,QuicChromiumClientStream::OnErroris called. -
Handle Detachment:
QuicChromiumClientStream::OnErrordetaches itsHandleby settinghandle_->stream_ = nullptr. Crucially, the underlyingQuicSpdyStreamremains active in the session's stream map and does not reset itsdatagram_visitor_pointer. -
Unregistration Failure: When the
QuicProxyDatagramClientSocketis eventually destroyed (e.g., as the inner session is torn down), itsClose()method attempts to unregister the visitor. This call goes throughHandle::UnregisterHttp3DatagramVisitor(). Because theHandlewas already detached from the stream in step 3, the unregistration function silently no-ops:C++ void QuicChromiumClientStream::Handle::UnregisterHttp3DatagramVisitor() { if (stream_) { stream_->UnregisterHttp3DatagramVisitor(); // Silently skipped } } -
Use-After-Free: The
QuicSpdyStreamcontinues to hold a dangling raw pointer to the deleted socket. A secondary trigger mechanism guarantees the stream stays alive: if a stream is closed while still waiting for ACKs (which an attacker can easily enforce by withholding ACKs), it remains in the session'sstream_map_as a "zombie stream".QuicSession::GetActiveStreamdoes not filter these streams. -
Triggering the Dereference: If the proxy subsequently sends a
DATAGRAMframe for the stream ID,QuicSpdyStream::OnDatagramReceivedis called, which invokesHandleReceivedDatagram. This function blindly callsdatagram_visitor_->OnHttp3Datagram(...)(located atnet/third_party/quiche/src/quiche/quic/core/http/quic_spdy_stream.cc:1550), resulting in a virtual function call on a freed object.
Impact
This vulnerability allows for potential Remote Code Execution (RCE) in the sandboxed Network Process. Because the datagram_visitor_ pointer resides in the third_party/quiche directory, it is a native C++ raw pointer (Http3DatagramVisitor*) and is not protected by MiraclePtr (BackupRefPtr). An attacker-controlled proxy (such as one configured via WPAD on a local network) can use this to execute arbitrary code by grooming the heap and reclaiming the freed socket's memory prior to sending the DATAGRAM frame.
Potential Reproduction Steps
(Note: These are potential steps as a full PoC has not yet been developed.)
- Configure Chrome to use a malicious CONNECT-UDP (MASQUE) proxy (e.g., via WPAD).
- A web application establishes a CONNECT-UDP tunnel. The proxy responds with 200 headers (setting
headers_decompressed_=trueon the outerQuicSpdyStream). - The attacker proxy intentionally withholds QUIC ACKs for data sent by the browser on the CONNECT-UDP stream, ensuring the stream enters a "zombie stream" state when closed.
- The proxy sends an HTTP/3 GOAWAY frame on the outer session's control stream that includes the CONNECT-UDP stream's ID.
- Chrome processes the GOAWAY, nullifying the stream handle but leaving the underlying stream and its dangling visitor pointer alive in the session.
- The inner session is destroyed due to the network error, freeing the
QuicProxyDatagramClientSocket. - The attacker proxy uses standard heap grooming to overwrite the freed socket object, pointing its vtable to attacker-controlled memory.
- The proxy sends a QUIC
DATAGRAMframe for the outer CONNECT-UDP stream's ID. - The browser's network process accesses the dangling
datagram_visitor_pointer and invokes a virtual function, hijacking the instruction pointer and leading to RCE.
Evaluated with Chrome root at commit: 0eb4855bda702feaaa8b899336664f97e3df88b8
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. Please feel free to reach out to me if you have concerns or feedback.
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 lifecycle mismatch: the stream handle is detached on GOAWAY without unregistering the datagram visitor, leaving a dangling raw pointer that is later dereferenced.
Impact
This could allow remote code execution in the sandboxed network process, but the text notes that a full proof of concept has not yet been developed.
What the attacker needed
Chrome configured to use a malicious proxy; Attacker controls the proxy; Victim uses CONNECT-UDP
How it was found
- Configure Chrome to use a malicious CONNECT-UDP (MASQUE) proxy (e.g., via WPAD).
- A web application establishes a CONNECT-UDP tunnel. The proxy responds with 200 headers.
- The attacker proxy intentionally withholds QUIC ACKs to keep the stream in a zombie state.
- The proxy sends an HTTP/3 GOAWAY frame including the CONNECT-UDP stream's ID.
- Chrome processes the GOAWAY, nullifying the stream handle but leaving the dangling visitor pointer.
- The inner session is destroyed, freeing the socket, and the proxy sends a DATAGRAM frame to trigger the use-after-free.
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 memory but keeps a pointer to it, that's a use-after-free. Here, a malicious proxy can make Chrome free an object but still use it later, which could let the attacker run their own code on the computer.
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.