Skip to content
Memory corruption Advisory Advanced CVE-2026-11030

Use after free in Network (CVE-2026-11030)

A use-after-free vulnerability exists in Chrome's SPDY session handling because an iterator is held across a call that can synchronously drain the session and erase the stream. An attacker-controlled HTTP/2 server could exploit this to potentially achieve remote code execution in the network process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: A potential Use-After-Free vulnerability exists in SpdySession::ResetStreamIterator due to iterator invalidation when a session drain is triggered synchronously. An attacker can exploit this by filling the write queue to its limit, causing a subsequent stream reset to trigger a session-wide cleanup that erases the stream being processed.

Affected files:

  • net/spdy/spdy_session.cc
  • net/spdy/spdy_session.h

Estimated timestamp from git blame: 2023-07-05

Summary

A potential Use-After-Free (UAF) vulnerability exists in net/spdy/spdy_session.cc within the SpdySession::ResetStreamIterator function. The vulnerability occurs because the function holds a std::map::iterator (ActiveStreamMap::iterator) across a call to EnqueueResetStreamFrame. If the number of queued capped frames exceeds the predefined limit (session_max_queued_capped_frames_, default 10,000), this call synchronously triggers a session drain. The drain process erases all active streams from the session's active_streams_ map, destroying the node the iterator points to. When control returns to ResetStreamIterator, it uses the now-invalidated iterator to call CloseActiveStreamIterator, leading to a UAF.

Technical Details

In SpdySession::ResetStreamIterator (net/spdy/spdy_session.cc), an iterator it to the active_streams_ map is captured by value. The function calls EnqueueResetStreamFrame:

C++
void SpdySession::ResetStreamIterator(ActiveStreamMap::iterator it,
                                      int error,
                                      const std::string& description) {
  // ...
  spdy::SpdyStreamId stream_id = it->first;
  RequestPriority priority = it->second->priority();
  EnqueueResetStreamFrame(stream_id, priority, error_code, description); // [1]

  // Removes any pending writes for the stream except for possibly an
  // in-flight one.
  CloseActiveStreamIterator(it, error); // [2] UAF occurs here
}

[1] EnqueueResetStreamFrame invokes EnqueueSessionWrite, which checks if the write queue has exceeded its capacity:

C++
  if (write_queue_.num_queued_capped_frames() >
      session_max_queued_capped_frames_) {
    LOG(WARNING)
        << "Draining session due to exceeding max queued capped frames";
    DoDrainSession(ERR_CONNECTION_CLOSED, "Exceeded max queued capped frames");
    return;
  }

If this condition is met, it synchronously calls DoDrainSession.

[2] DoDrainSession calls StartGoingAway(0, err), which iterates through all entries in active_streams_ and synchronously calls CloseActiveStreamIterator on each, effectively erasing them from the map. This destroys the std::map node that the iterator it points to.

When EnqueueResetStreamFrame returns, ResetStreamIterator resumes and calls CloseActiveStreamIterator(it, error) with the dangling iterator. This leads to a UAF read of it->second to retrieve the SpdyStream*, a UAF write during active_streams_.erase(it) (libc++ tree rebalancing), and an arbitrary free/control flow hijack via the virtual call stream->OnClose(status) within DeleteStream.

MiraclePtr (BackupRefPtr) does not protect the std::map internal tree nodes nor the raw SpdyStream* pointers stored within the map, rendering this fully exploitable.

Potential Attack Scenario

Our tooling agent doesn't yet have the ability to run code, but the following are the potential steps an attacker-controlled HTTP/2 server would follow to exploit this:

  1. Keep at least one HTTP/2 stream active.
  2. Stall TCP reads (e.g., advertise a TCP zero-window) to stall Chrome's outgoing socket_->Write() operations, causing outgoing frames to queue.
  3. Send exactly 10,001 PING frames (with ACK=0). Because of the strict > comparison in EnqueueSessionWrite, the 10,001st frame is queued without triggering the drain.
  4. Send a WINDOW_UPDATE frame with an invalid delta_window_size of 0 for the active stream. Chrome calls ResetStreamIterator for that stream.
  5. EnqueueResetStreamFrame pushes the RST_STREAM frame to the queue, raising the count to 10,002. This triggers the synchronous drain (10001 > 10000), invalidating the iterator.
  6. Control returns to ResetStreamIterator, which uses the dangling iterator, causing the UAF. The attacker can potentially reclaim the freed map node memory with a carefully crafted payload to hijack the OnClose virtual call and achieve RCE in the Network process.

Potential Fix

Modify ResetStreamIterator to take a spdy::SpdyStreamId instead of an ActiveStreamMap::iterator. After calling EnqueueResetStreamFrame, look up the stream again using active_streams_.find(stream_id). If it is not found (because a synchronous drain occurred), simply return.

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from 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. And please feel free to reach out to me directly if you have concerns or feedback on the project.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 function holds an iterator to the active streams map across a call that can synchronously drain the session and erase all streams, invalidating the iterator.

Impact

The attacker could potentially reclaim the freed memory and hijack a virtual call to achieve remote code execution in the Network process.

What the attacker needed

Attacker-controlled HTTP/2 server; victim connects to malicious server

The fix

The fix should modify ResetStreamIterator to take a stream ID instead of an iterator, and after enqueueing the reset frame, look up the stream again and return if it is not found.

How it was found

  1. Keep at least one HTTP/2 stream active.
  2. Stall TCP reads to cause outgoing frames to queue.
  3. Send exactly 10,001 PING frames with ACK=0 to fill the write queue without triggering a drain.
  4. Send a WINDOW_UPDATE frame with an invalid delta_window_size of 0 for the active stream, causing Chrome to call ResetStreamIterator.
  5. The RST_STREAM frame pushes the queue over the limit, triggering a synchronous drain that erases the stream and invalidates the iterator.
  6. Control returns to ResetStreamIterator, which uses the dangling iterator, causing 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.

A use-after-free happens when a program keeps a pointer to memory after that memory has been freed, and then uses it again. Here, the code holds a reference to a stream while calling a function that can free all streams, so when it later uses that reference, it is pointing to freed memory. An attacker who controls the server could try to exploit this to run their own code on the victim's 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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.