Use after free in Network (CVE-2026-10882)
A use-after-free write in Chromium's HTTP/2 stack occurs when a malicious server sends a burst of SETTINGS frames followed by a padded DATA frame, causing the session to drain synchronously and free the SpdyStream object while IncreaseRecvWindowSize is still executing. An attacker could crash the Network Service or potentially achieve code execution.
c6eed09fc8b174b0f3eebedcceb1e792 Follow
Originally disclosed on Chrome VRP
- Fix shipped in 47 days
Missing lifetime check in SpdyStream::IncreaseRecvWindowSize leads to use-after-free in Network Service
Summary
A use-after-free write exists in the HTTP/2 stack of Chromium's Network Service. When a malicious HTTP/2 server sends a burst of control frames followed by a padded DATA frame, the resulting WINDOW_UPDATE enqueue can synchronously trigger session draining, which destroys the SpdyStream object while SpdyStream::IncreaseRecvWindowSize is still on the call stack. The function then writes to a member of the freed object. This affects all desktop and mobile platforms. No special GPU or hardware requirements apply.
Bisect
Introducing Commit: 410676ab9660a0271949e043ddb8678a6d18b097
- Date: 2019-08-13
- Author: David Schinazi
- Review: https://chromium-review.googlesource.com/c/chromium/src/+/1752387
This commit added the capped-frame overflow check in EnqueueSessionWrite as a mitigation for CVE-2019-9512, CVE-2019-9514, and CVE-2019-9515. Before this commit, EnqueueSessionWrite never synchronously destroyed streams, so the missing lifetime check in IncreaseRecvWindowSize was not reachable. The mitigation introduced a new code path where DoDrainSession fires synchronously from within EnqueueSessionWrite, creating the UAF.
Root Cause
SpdyStream::IncreaseRecvWindowSize calls session_->SendStreamWindowUpdate and then immediately writes to a member field without verifying that the stream is still alive:
// net/spdy/spdy_stream.cc
void SpdyStream::IncreaseRecvWindowSize(int32_t delta_window_size) {
// ...
if (unacked_recv_window_bytes_ > max_recv_window_size_ / 2 ||
elapsed >= session_->TimeToBufferSmallWindowUpdates()) {
last_recv_window_update_ = base::TimeTicks::Now();
session_->SendStreamWindowUpdate(
stream_id_, static_cast<uint32_t>(unacked_recv_window_bytes_));
unacked_recv_window_bytes_ = 0; // UAF write: stream may have been freed
}
}
The call to SendStreamWindowUpdate chains through SendWindowUpdateFrame into EnqueueSessionWrite. EnqueueSessionWrite contains a guard that synchronously drains the session when the capped-frame queue exceeds a configurable limit:
// net/spdy/spdy_session.cc
void SpdySession::EnqueueSessionWrite(...) {
// ...
if (write_queue_.num_queued_capped_frames() >
session_max_queued_capped_frames_) {
DoDrainSession(ERR_CONNECTION_CLOSED, "Exceeded max queued capped frames");
return;
}
// ...
}
DoDrainSession calls StartGoingAway, which iterates over all active streams and destroys them via CloseActiveStreamIterator and DeleteStream. The SpdyStream whose IncreaseRecvWindowSize is on the call stack is among those destroyed. When control returns to IncreaseRecvWindowSize, the assignment unacked_recv_window_bytes_ = 0 writes to freed heap memory.
The inconsistency is visible within the same file. SpdyStream::OnPaddingConsumed does capture a WeakPtr before calling DecreaseRecvWindowSize and checks it before proceeding, but this guard does not cover the IncreaseRecvWindowSize call that follows:
// net/spdy/spdy_stream.cc
void SpdyStream::OnPaddingConsumed(size_t len) {
base::WeakPtr<SpdyStream> weak_this = GetWeakPtr();
DecreaseRecvWindowSize(static_cast<int32_t>(len));
if (!weak_this)
return;
IncreaseRecvWindowSize(static_cast<int32_t>(len));
// No check after IncreaseRecvWindowSize; if it triggers DoDrainSession,
// `this` is already freed before we return.
}
Similarly, SpdyStream::OnDataReceived protects itself with a WeakPtr around DecreaseRecvWindowSize but the consume-callback path through OnReadBufferConsumed into IncreaseRecvWindowSize lacks the same protection.
The triggering sequence works as follows. SpdySession::OnStreamPadding, called during frame decoding inside DoReadComplete, first invokes the session-level IncreaseRecvWindowSize and then calls OnPaddingConsumed on the stream:
// net/spdy/spdy_session.cc
void SpdySession::OnStreamPadding(spdy::SpdyStreamId stream_id, size_t len) {
DecreaseRecvWindowSize(static_cast<int32_t>(len));
IncreaseRecvWindowSize(static_cast<int32_t>(len)); // session-level
auto it = active_streams_.find(stream_id);
if (it == active_streams_.end())
return;
it->second->OnPaddingConsumed(len); // stream-level
}
An attacker controlling an HTTP/2 server can exploit the differential thresholds between session-level and stream-level WINDOW_UPDATE to ensure the session-level call does not trigger draining while the stream-level call does. The session-level WINDOW_UPDATE threshold is half of 15 MB (7.5 MB), while the stream-level threshold is half of 6 MB (3 MB). Alternatively, both levels have a time-based fallback that fires after kDefaultTimeToBufferSmallWindowUpdates (5 seconds) of inactivity. By sending exactly N SETTINGS frames (where N equals the configured session_max_queued_capped_frames limit) followed by a single padded DATA frame after the 5-second window has elapsed, the attacker arranges for the session WINDOW_UPDATE to pass the overflow check (N > N is false), bringing the queue to N+1, and then the stream WINDOW_UPDATE to fail the check (N+1 > N is true), triggering DoDrainSession.
Because all frames arrive within a single DoReadComplete call (the entire burst is under kReadBufferSize of 8192 bytes), the write loop never has an opportunity to drain any of the queued SETTINGS ACK frames. The capped-frame count is guaranteed to be at N when the critical WINDOW_UPDATE is enqueued.
The session_max_queued_capped_frames parameter defaults to 10000 and is configurable through the HTTP2 field trial ("spdy_session_max_queued_capped_frames"). The vulnerability exists regardless of the configured value; only the number of SETTINGS frames the attacker must send changes. With the default value of 10000, the attacker sends 10001 SETTINGS frames (approximately 90 KB), which may span multiple DoReadComplete iterations due to the 8 KB read buffer, but the write loop is unable to keep pace with the read loop's frame processing, allowing the queue to grow past the limit. At default settings the attacker can also apply TCP-level backpressure by not reading from its end of the connection, stalling the client's outbound socket and preventing any queued ACKs from being flushed. For stable reproduction in the attached PoC, the limit is set to 100 via the field trial so that the entire attack burst (100 SETTINGS plus one padded DATA frame, 1166 bytes total) fits within a single 8 KB read and triggers deterministically in one DoReadComplete call.
Reproduce
Tested on commit effccce563102fd8315819caf7677f68394be7af (Linux x86_64). No source modifications required.
Start the malicious HTTP/2 server from the issue directory:
python3 server.py
Launch Chrome in a separate terminal. The field trial parameter lowers the capped-frame limit from the default 10000 to 100 for stable, deterministic reproduction; the underlying bug is identical at any limit value.
ASAN_OPTIONS=detect_odr_violation=0 ~/chromium/src/out/asan-release/chrome \
--no-sandbox --disable-gpu --ignore-certificate-errors \
--user-data-dir=/tmp/poc-$(date +%s) \
--headless=new \
--force-fieldtrials=HTTP2/Experiment/ \
--force-fieldtrial-params="HTTP2.Experiment:spdy_session_max_queued_capped_frames/100" \
https://localhost:8443/
The Network Service IO thread crashes with a heap-use-after-free within approximately 8 seconds.
==1795377==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c827e119d14 at pc 0x7f12fcc0c1e9 bp 0x7b1271590750 sp 0x7b1271590748
WRITE of size 4 at 0x7c827e119d14 thread T7 (Chrome_ChildIOT)
#0 0x7f12fcc0c1e8 in net::SpdyStream::IncreaseRecvWindowSize(int) net/spdy/spdy_stream.cc:289:32
#1 0x7f12fcc10913 in net::SpdyStream::OnPaddingConsumed(unsigned long) net/spdy/spdy_stream.cc:497:3
#2 0x7f12fcbd6cd4 in net::SpdySession::OnStreamPadding(unsigned int, unsigned long) net/spdy/spdy_session.cc:3032:15
#3 0x7f12fb3c9537 in http2::FrameDecoderState::ReadPadLength(http2::DecodeBuffer*, bool) net/third_party/quiche/src/quiche/http2/decoder/frame_decoder_state.cc:29:21
#4 0x7f12fb3ce259 in http2::DataPayloadDecoder::ResumeDecodingPayload(http2::FrameDecoderState*, http2::DecodeBuffer*) net/third_party/quiche/src/quiche/http2/decoder/payload_decoders/data_payload_decoder.cc:98:23
#5 0x7f12fb3ca47f in http2::Http2FrameDecoder::StartDecodingPayload(http2::DecodeBuffer*) net/third_party/quiche/src/quiche/http2/decoder/http2_frame_decoder.cc:293:32
#6 0x7f12fb3c9e29 in http2::Http2FrameDecoder::DecodeFrame(http2::DecodeBuffer*) net/third_party/quiche/src/quiche/http2/decoder/http2_frame_decoder.cc:57:16
#7 0x7f12fb3993d5 in http2::Http2DecoderAdapter::ProcessInputFrame(char const*, unsigned long) net/third_party/quiche/src/quiche/http2/core/http2_frame_decoder_adapter.cc:800:40
#8 0x7f12fb399206 in http2::Http2DecoderAdapter::ProcessInput(char const*, unsigned long) net/third_party/quiche/src/quiche/http2/core/http2_frame_decoder_adapter.cc:272:30
#9 0x7f12fcbcd528 in net::SpdySession::DoReadComplete(int) net/spdy/spdy_session.cc:2063:53
#10 0x7f12fcbcbed6 in net::SpdySession::DoReadLoop(net::SpdySession::ReadState, int) net/spdy/spdy_session.cc:1981:18
#11 0x7f12fcbc87b0 in net::SpdySession::PumpReadLoop(net::SpdySession::ReadState, int) net/spdy/spdy_session.cc:1957:17
0x7c827e119d14 is located 148 bytes inside of 648-byte region [0x7c827e119c80,0x7c827e119f08)
freed by thread T7 (Chrome_ChildIOT) here:
#0 0x560911f23ec2 in operator delete(void*, unsigned long)
#1 0x7f12fcbc19a5 in net::SpdySession::CloseActiveStreamIterator(...) net/spdy/spdy_session.cc:1855:3
#2 0x7f12fcbc3e7b in net::SpdySession::StartGoingAway(unsigned int, net::Error) net/spdy/spdy_session.cc:1396:5
#3 0x7f12fcbbd03f in net::SpdySession::DoDrainSession(...) net/spdy/spdy_session.cc:2744:5
#4 0x7f12fcbcafa6 in net::SpdySession::EnqueueSessionWrite(...) net/spdy/spdy_session.cc:2562:5
#5 0x7f12fcbc354a in net::SpdySession::SendWindowUpdateFrame(...) net/spdy/spdy_session.cc:2473:3
#6 0x7f12fcbc2f8c in net::SpdySession::SendStreamWindowUpdate(...) net/spdy/spdy_session.cc:1349:3
#7 0x7f12fcc0bf49 in net::SpdyStream::IncreaseRecvWindowSize(int) net/spdy/spdy_stream.cc:284:15
#8 0x7f12fcc10913 in net::SpdyStream::OnPaddingConsumed(unsigned long) net/spdy/spdy_stream.cc:497:3
#9 0x7f12fcbd6cd4 in net::SpdySession::OnStreamPadding(unsigned int, unsigned long) net/spdy/spdy_session.cc:3032:15
previously allocated by thread T7 (Chrome_ChildIOT) here:
#0 0x560911f232bd in operator new(unsigned long)
#1 0x7f12fcbc8c3e in net::SpdySession::CreateStream(...) gen/third_party/libc++/src/include/__memory/unique_ptr.h:756:26
References
- net/spdy/spdy_stream.cc: IncreaseRecvWindowSize
- net/spdy/spdy_stream.cc: OnPaddingConsumed
- net/spdy/spdy_session.cc: EnqueueSessionWrite
- net/spdy/spdy_session.cc: OnStreamPadding
- net/spdy/spdy_session.cc: DoDrainSession
- Introducing commit (HTTP2 DoS Mitigations)
Credit
Please use c6eed09fc8b174b0f3eebedcceb1e792 as the credit for this vulnerability. Thank you.
Context
This report describes a use-after-free write in the HTTP/2 stack of Chromium's Network Service, tracked as CVE-2026-10882 and disclosed through the Chrome VRP. The affected component is the Network Service, specifically the SPDY/HTTP/2 session and stream code in net/spdy. The report asks for the credit [redacted]. the severity is critical, and the bounty was 43,000 USD. The report was disclosed on 2026-06-02.
HTTP/2 streams carry a receive window. As a client consumes data, it sends WINDOW_UPDATE frames to tell the server how much more it may send. Chromium batches these updates: small increments are accumulated in unacked_recv_window_bytes_ and only flushed when the accumulated amount passes half of the configured maximum window, or when a time-based fallback expires. SpdyStream::IncreaseRecvWindowSize is the function that performs this accounting and, when the threshold is crossed, calls into the session to enqueue a WINDOW_UPDATE frame.
The bug is that this enqueue path can synchronously destroy the stream that is still executing on the call stack. When that happens, the function resumes and writes to a member of the freed object.
Setup
The report states that the issue affects all desktop and mobile platforms, with no special GPU or hardware requirements. Reproduction was performed on commit [redacted] on Linux x86_64, with no source modifications required.
The researcher used:
- A malicious HTTP/2 server, run from the issue directory with
python3 server.py. - An AddressSanitizer build of Chrome at
~/chromium/src/out/asan-release/chrome. - A field trial override to lower the capped-frame queue limit from its default of 10000 to 100, so that the whole attack burst fits in a single read and triggers deterministically.
The report does not describe any account, role or authentication requirement. The report says an attacker controlling an HTTP/2 server can exploit the bug.
Finding it
The researcher traced the lifetime problem through the call chain. SpdyStream::IncreaseRecvWindowSize calls session_->SendStreamWindowUpdate, which chains through SendWindowUpdateFrame into EnqueueSessionWrite. That function contains a guard that synchronously drains the session when the capped-frame queue exceeds a configurable limit. Draining destroys active streams, including the one whose IncreaseRecvWindowSize is still on the stack. Control then returns to IncreaseRecvWindowSize, which writes unacked_recv_window_bytes_ = 0 into freed heap memory.
The inconsistency is visible within the same file. SpdyStream::OnPaddingConsumed captures a WeakPtr before calling DecreaseRecvWindowSize and checks it before proceeding, but that guard does not cover the IncreaseRecvWindowSize call that follows. Likewise, SpdyStream::OnDataReceived protects itself with a WeakPtr around DecreaseRecvWindowSize, but the consume-callback path through OnReadBufferConsumed into IncreaseRecvWindowSize lacks the same protection.
A bisect identified the introducing commit as [redacted], dated 2019-08-13, authored by David Schinazi, reviewed at https://chromium-review.googlesource.com/c/chromium/src/+/1752387. That commit added the capped-frame overflow check in EnqueueSessionWrite as a mitigation for CVE-2019-9512, CVE-2019-9514 and CVE-2019-9515. Before it, EnqueueSessionWrite never synchronously destroyed streams, so the missing lifetime check in IncreaseRecvWindowSize was not reachable. The mitigation introduced a new code path where DoDrainSession fires synchronously from within EnqueueSessionWrite, creating the use-after-free.
Exploitation
Step 1: Understand the triggering sequence
The report explains that SpdySession::OnStreamPadding, called during frame decoding inside DoReadComplete, first invokes the session-level IncreaseRecvWindowSize and then calls OnPaddingConsumed on the stream:
// net/spdy/spdy_session.cc
void SpdySession::OnStreamPadding(spdy::SpdyStreamId stream_id, size_t len) {
DecreaseRecvWindowSize(static_cast<int32_t>(len));
IncreaseRecvWindowSize(static_cast<int32_t>(len)); // session-level
auto it = active_streams_.find(stream_id);
if (it == active_streams_.end())
return;
it->second->OnPaddingConsumed(len); // stream-level
}
A padded DATA frame therefore produces two WINDOW_UPDATE enqueues: one at session level and one at stream level. The attacker exploits the difference between their thresholds.
Step 2: Exploit the differential thresholds
The session-level WINDOW_UPDATE threshold is half of 15 MB (7.5 MB), while the stream-level threshold is half of 6 MB (3 MB). Alternatively, both levels have a time-based fallback that fires after kDefaultTimeToBufferSmallWindowUpdates (5 seconds) of inactivity.
By sending exactly N SETTINGS frames, where N equals the configured session_max_queued_capped_frames limit, followed by a single padded DATA frame after the 5-second window has elapsed, the attacker arranges the following:
- The session WINDOW_UPDATE passes the overflow check, because N > N is false, bringing the queue to N+1.
- The stream WINDOW_UPDATE then fails the check, because N+1 > N is true, triggering
DoDrainSession.
Because all frames arrive within a single DoReadComplete call (the entire burst is under kReadBufferSize of 8192 bytes), the write loop never has an opportunity to drain any of the queued SETTINGS ACK frames. The capped-frame count is guaranteed to be at N when the critical WINDOW_UPDATE is enqueued.
Step 3: Account for the default limit
The session_max_queued_capped_frames parameter defaults to 10000 and is configurable through the HTTP2 field trial (spdy_session_max_queued_capped_frames). The vulnerability exists regardless of the configured value; only the number of SETTINGS frames the attacker must send changes.
With the default value of 10000, the attacker sends 10001 SETTINGS frames (approximately 90 KB), which may span multiple DoReadComplete iterations due to the 8 KB read buffer. The write loop is unable to keep pace with the read loop's frame processing, allowing the queue to grow past the limit. At default settings the attacker can also apply TCP-level backpressure by not reading from its end of the connection, stalling the client's outbound socket and preventing any queued ACKs from being flushed.
Step 4: Reproduce with a lowered limit
For stable reproduction in the attached PoC, the limit is set to 100 via the field trial so that the entire attack burst (100 SETTINGS plus one padded DATA frame, 1166 bytes total) fits within a single 8 KB read and triggers deterministically in one DoReadComplete call.
Start the malicious HTTP/2 server from the issue directory:
python3 server.py
Launch Chrome in a separate terminal:
ASAN_OPTIONS=detect_odr_violation=0 ~/chromium/src/out/asan-release/chrome \
--no-sandbox --disable-gpu --ignore-certificate-errors \
--user-data-dir=/tmp/poc-$(date +%s) \
--headless=new \
--force-fieldtrials=HTTP2/Experiment/ \
--force-fieldtrial-params="HTTP2.Experiment:spdy_session_max_queued_capped_frames/100" \
https://localhost:8443/
The report gives this command to launch Chrome against the local server with the field trial parameter set to 100.
Step 5: Observe the crash
The Network Service IO thread crashes with a heap-use-after-free within approximately 8 seconds:
==1795377==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c827e119d14 at pc 0x7f12fcc0c1e9 bp 0x7b1271590750 sp 0x7b1271590748
WRITE of size 4 at 0x7c827e119d14 thread T7 (Chrome_ChildIOT)
#0 0x7f12fcc0c1e8 in net::SpdyStream::IncreaseRecvWindowSize(int) net/spdy/spdy_stream.cc:289:32
#1 0x7f12fcc10913 in net::SpdyStream::OnPaddingConsumed(unsigned long) net/spdy/spdy_stream.cc:497:3
#2 0x7f12fcbd6cd4 in net::SpdySession::OnStreamPadding(unsigned int, unsigned long) net/spdy/spdy_session.cc:3032:15
#3 0x7f12fb3c9537 in http2::FrameDecoderState::ReadPadLength(http2::DecodeBuffer*, bool) net/third_party/quiche/src/quiche/http2/decoder/frame_decoder_state.cc:29:21
#4 0x7f12fb3ce259 in http2::DataPayloadDecoder::ResumeDecodingPayload(http2::FrameDecoderState*, http2::DecodeBuffer*) net/third_party/quiche/src/quiche/http2/decoder/payload_decoders/data_payload_decoder.cc:98:23
#5 0x7f12fb3ca47f in http2::Http2FrameDecoder::StartDecodingPayload(http2::DecodeBuffer*) net/third_party/quiche/src/quiche/http2/decoder/http2_frame_decoder.cc:293:32
#6 0x7f12fb3c9e29 in http2::Http2FrameDecoder::DecodeFrame(http2::DecodeBuffer*) net/third_party/quiche/src/quiche/http2/decoder/http2_frame_decoder.cc:57:16
#7 0x7f12fb3993d5 in http2::Http2DecoderAdapter::ProcessInputFrame(char const*, unsigned long) net/third_party/quiche/src/quiche/http2/core/http2_frame_decoder_adapter.cc:800:40
#8 0x7f12fb399206 in http2::Http2DecoderAdapter::ProcessInput(char const*, unsigned long) net/third_party/quiche/src/quiche/http2/core/http2_frame_decoder_adapter.cc:272:30
#9 0x7f12fcbcd528 in net::SpdySession::DoReadComplete(int) net/spdy/spdy_session.cc:2063:53
#10 0x7f12fcbcbed6 in net::SpdySession::DoReadLoop(net::SpdySession::ReadState, int) net/spdy/spdy_session.cc:1981:18
#11 0x7f12fcbc87b0 in net::SpdySession::PumpReadLoop(net::SpdySession::ReadState, int) net/spdy/spdy_session.cc:1957:17
0x7c827e119d14 is located 148 bytes inside of 648-byte region [0x7c827e119c80,0x7c827e119f08)
freed by thread T7 (Chrome_ChildIOT) here:
#0 0x560911f23ec2 in operator delete(void*, unsigned long)
#1 0x7f12fcbc19a5 in net::SpdySession::CloseActiveStreamIterator(...) net/spdy/spdy_session.cc:1855:3
#2 0x7f12fcbc3e7b in net::SpdySession::StartGoingAway(unsigned int, net::Error) net/spdy/spdy_session.cc:1396:5
#3 0x7f12fcbbd03f in net::SpdySession::DoDrainSession(...) net/spdy/spdy_session.cc:2744:5
#4 0x7f12fcbcafa6 in net::SpdySession::EnqueueSessionWrite(...) net/spdy/spdy_session.cc:2562:5
#5 0x7f12fcbc354a in net::SpdySession::SendWindowUpdateFrame(...) net/spdy/spdy_session.cc:2473:3
#6 0x7f12fcbc2f8c in net::SpdySession::SendStreamWindowUpdate(...) net/spdy/spdy_session.cc:1349:3
#7 0x7f12fcc0bf49 in net::SpdyStream::IncreaseRecvWindowSize(int) net/spdy/spdy_stream.cc:284:15
#8 0x7f12fcc10913 in net::SpdyStream::OnPaddingConsumed(unsigned long) net/spdy/spdy_stream.cc:497:3
#9 0x7f12fcbd6cd4 in net::SpdySession::OnStreamPadding(unsigned int, unsigned long) net/spdy/spdy_session.cc:3032:15
previously allocated by thread T7 (Chrome_ChildIOT) here:
#0 0x560911f232bd in operator new(unsigned long)
#1 0x7f12fcbc8c3e in net::SpdySession::CreateStream(...) gen/third_party/libc++/src/include/__memory/unique_ptr.h:756:26
The allocation stack shows the stream was created by SpdySession::CreateStream. The free stack shows it was destroyed by CloseActiveStreamIterator from StartGoingAway, called from DoDrainSession, called from EnqueueSessionWrite, called from SendWindowUpdateFrame, called from SendStreamWindowUpdate, called from IncreaseRecvWindowSize. The write stack shows the same IncreaseRecvWindowSize frame performing a 4-byte write at spdy_stream.cc:289:32 after the object was freed.
Root cause
SpdyStream::IncreaseRecvWindowSize calls session_->SendStreamWindowUpdate and then immediately writes to a member field without verifying that the stream is still alive:
// net/spdy/spdy_stream.cc
void SpdyStream::IncreaseRecvWindowSize(int32_t delta_window_size) {
// ...
if (unacked_recv_window_bytes_ > max_recv_window_size_ / 2 ||
elapsed >= session_->TimeToBufferSmallWindowUpdates()) {
last_recv_window_update_ = base::TimeTicks::Now();
session_->SendStreamWindowUpdate(
stream_id_, static_cast<uint32_t>(unacked_recv_window_bytes_));
unacked_recv_window_bytes_ = 0; // UAF write: stream may have been freed
}
}
The call to SendStreamWindowUpdate chains through SendWindowUpdateFrame into EnqueueSessionWrite. EnqueueSessionWrite contains a guard that synchronously drains the session when the capped-frame queue exceeds a configurable limit:
// net/spdy/spdy_session.cc
void SpdySession::EnqueueSessionWrite(...) {
// ...
if (write_queue_.num_queued_capped_frames() >
session_max_queued_capped_frames_) {
DoDrainSession(ERR_CONNECTION_CLOSED, "Exceeded max queued capped frames");
return;
}
// ...
}
DoDrainSession calls StartGoingAway, which iterates over all active streams and destroys them via CloseActiveStreamIterator and DeleteStream. The SpdyStream whose IncreaseRecvWindowSize is on the call stack is among those destroyed. When control returns to IncreaseRecvWindowSize, the assignment unacked_recv_window_bytes_ = 0 writes to freed heap memory.
Existing defences did not stop it because the WeakPtr guards in OnPaddingConsumed and OnDataReceived only cover DecreaseRecvWindowSize, not the IncreaseRecvWindowSize call that follows.
Impact
The report describes a use-after-free write in the Network Service of Chromium, reachable by any attacker who controls an HTTP/2 server the browser connects to. The write is a 4-byte store into freed heap memory. The report does not describe a specific exploitation primitive beyond the memory corruption itself, and does not state whether the freed region can be reallocated with attacker-controlled contents. It notes that the issue affects all desktop and mobile platforms and requires no special GPU or hardware requirements. The severity assigned by the platform is critical.
Fix
It identifies the missing lifetime check in IncreaseRecvWindowSize as the defect and notes that the existing WeakPtr guards in OnPaddingConsumed and OnDataReceived do not cover the IncreaseRecvWindowSize call.
Variants to test
- Other callers of
SendStreamWindowUpdateorSendWindowUpdateFramethat write to stream members after the call. A positive result is an ASan report showing a write to a freedSpdyStreamfrom a frame other than a padded DATA frame. - The
OnReadBufferConsumedpath intoIncreaseRecvWindowSize, which the report says lacks the sameWeakPtrprotection asOnDataReceived. A positive result is a use-after-free triggered by consuming buffered data rather than by padding. - Other synchronous drain triggers inside
EnqueueSessionWrite, such as different capped-frame types or other queue limits. A positive result is a stream destroyed synchronously from a frame enqueue while a stream method is on the stack. - Different values of
session_max_queued_capped_framesvia the HTTP2 field trial. A positive result is the same crash with a different number of SETTINGS frames, confirming the bug is independent of the configured limit. - TCP-level backpressure combined with the default limit of 10000, as the report describes. A positive result is the queue growing past the limit across multiple
DoReadCompleteiterations and the same use-after-free occurring without lowering the limit.
What happened, in plain words
A web browser is a program that fetches pages from servers and shows them to you. Chrome, made by Google, is one such browser. Inside Chrome there is a part called the Network Service. Its job is to talk to servers: it opens connections, sends requests and receives replies. This report is about a bug in that part.
The bug is a memory safety problem called a use-after-free. To understand it, imagine you borrow a library book, write notes in it, return it, and then later try to write in it again. The book may still be on the shelf, or it may have been given to someone else, or it may have been thrown away. Writing in it after you returned it is a mistake, and the consequences are unpredictable. In a computer, a program asks the operating system for a block of memory, uses it, gives it back, and then accidentally writes into it again. That is a use-after-free. If an attacker can control what lands in that memory afterwards, the mistake can become a security hole.
This particular use-after-free happens in the code that speaks HTTP/2. HTTP/2 is a set of rules for how a browser and a server exchange data over one connection. It is the successor to HTTP/1.1 and is used by most modern websites. The bug can be triggered by a malicious server, that is, a server that deliberately sends unusual but still valid HTTP/2 messages. The report asks for the credit [redacted]. The report was disclosed on 2026-06-02 through the Chrome VRP, Google's bug bounty programme for Chrome. The severity is critical and the bounty was 43,000 USD.
The report does not describe any login, account or permission needed. The attacker is on the server side: they control the HTTP/2 server that the browser connects to.
Context
This report describes a use-after-free write in the HTTP/2 stack of Chromium's Network Service, tracked as CVE-2026-10882 and disclosed through the Chrome VRP. The affected component is the Network Service, specifically the SPDY/HTTP/2 session and stream code in net/spdy. The researcher is credited as [redacted], the severity is critical, and the bounty was 43,000 USD. The report was disclosed on 2026-06-02.
A few terms first. Chromium is the open-source project that Chrome is built from. A CVE is a public identifier for a known security flaw, so people can talk about the same bug without confusion. A bounty is money paid to a researcher who reports a bug responsibly. SPDY was an earlier experimental protocol that led to HTTP/2; the code still uses the name Spdy in many places.
HTTP/2 streams carry a receive window. Think of a stream as one conversation inside a shared phone line: the connection can carry many streams at once, and each stream is a separate request and response. The receive window is a credit system. The server is allowed to send only as much data as the client has said it can accept. As the client consumes data, it sends WINDOW_UPDATE frames to tell the server how much more it may send. A frame is a small packet of HTTP/2 data with a type, such as DATA, SETTINGS or WINDOW_UPDATE.
Chromium batches these updates: small increments are accumulated in unacked_recv_window_bytes_ and only flushed when the accumulated amount passes half of the configured maximum window, or when a time-based fallback expires. Batching saves network traffic: instead of sending a tiny update for every few bytes, the browser waits until it has something worth saying. SpdyStream::IncreaseRecvWindowSize is the function that performs this accounting and, when the threshold is crossed, calls into the session to enqueue a WINDOW_UPDATE frame. To enqueue means to put the frame in a queue to be written to the network later.
The bug is that this enqueue path can synchronously destroy the stream that is still executing on the call stack. Synchronously means immediately, inside the same function call, before the caller gets a chance to continue. The call stack is the list of functions that are currently running, one inside another. When that happens, the function resumes and writes to a member of the freed object. A member is a variable that belongs to an object, like a field in a form.
Setup
The report states that the issue affects all desktop and mobile platforms, with no special GPU or hardware requirements. Reproduction was performed on commit [redacted] on Linux x86_64, with no source modifications required. A commit is a saved snapshot of the source code; the long hexadecimal string identifies exactly which snapshot was used. Linux x86_64 is a common 64-bit Linux system.
The researcher used:
- A malicious HTTP/2 server, run from the issue directory with
python3 server.py. - An AddressSanitizer build of Chrome at
~/chromium/src/out/asan-release/chrome. - A field trial override to lower the capped-frame queue limit from its default of 10000 to 100, so that the whole attack burst fits in a single read and triggers deterministically.
AddressSanitizer, often shortened to ASan, is a tool built into a special version of a program that watches memory use and reports mistakes such as use-after-free. A field trial is a mechanism that lets Chrome turn features or settings on and off remotely, or from the command line, without rebuilding the browser. The capped-frame queue limit is a safety limit on how many certain frames may wait in the outgoing queue before Chrome gives up on the connection.
The report does not describe any account, role or authentication requirement. The attack is server-side: the attacker controls the HTTP/2 server that the browser connects to.
Finding it
The researcher traced the lifetime problem through the call chain. A call chain is the path of function calls: function A calls B, B calls C, and so on. SpdyStream::IncreaseRecvWindowSize calls session_->SendStreamWindowUpdate, which chains through SendWindowUpdateFrame into EnqueueSessionWrite. That function contains a guard that synchronously drains the session when the capped-frame queue exceeds a configurable limit. Draining means closing the connection and cleaning up all streams on it. Draining destroys active streams, including the one whose IncreaseRecvWindowSize is still on the stack. Control then returns to IncreaseRecvWindowSize, which writes unacked_recv_window_bytes_ = 0 into freed heap memory. The heap is the pool of memory a program uses for objects it creates while running.
The inconsistency is visible within the same file. SpdyStream::OnPaddingConsumed captures a WeakPtr before calling DecreaseRecvWindowSize and checks it before proceeding, but that guard does not cover the IncreaseRecvWindowSize call that follows. A WeakPtr is a special kind of pointer that does not keep an object alive; it can tell you whether the object still exists. It is like a note that says "check whether the room is still there" rather than a key that keeps the door locked open. Likewise, SpdyStream::OnDataReceived protects itself with a WeakPtr around DecreaseRecvWindowSize, but the consume-callback path through OnReadBufferConsumed into IncreaseRecvWindowSize lacks the same protection.
A bisect identified the introducing commit as [redacted], dated 2019-08-13, authored by David Schinazi, reviewed at https://chromium-review.googlesource.com/c/chromium/src/+/1752387. A bisect is a search through the history of a project to find the exact change that introduced a bug, usually by testing the middle of a range and halving it repeatedly. That commit added the capped-frame overflow check in EnqueueSessionWrite as a mitigation for CVE-2019-9512, CVE-2019-9514 and CVE-2019-9515. A mitigation is a change that reduces the harm of a problem without necessarily removing its cause. Before it, EnqueueSessionWrite never synchronously destroyed streams, so the missing lifetime check in IncreaseRecvWindowSize was not reachable. The mitigation introduced a new code path where DoDrainSession fires synchronously from within EnqueueSessionWrite, creating the use-after-free.
Exploitation
Step 1: Understand the triggering sequence
The report explains that SpdySession::OnStreamPadding, called during frame decoding inside DoReadComplete, first invokes the session-level IncreaseRecvWindowSize and then calls OnPaddingConsumed on the stream:
// net/spdy/spdy_session.cc
void SpdySession::OnStreamPadding(spdy::SpdyStreamId stream_id, size_t len) {
DecreaseRecvWindowSize(static_cast<int32_t>(len));
IncreaseRecvWindowSize(static_cast<int32_t>(len)); // session-level
auto it = active_streams_.find(stream_id);
if (it == active_streams_.end())
return;
it->second->OnPaddingConsumed(len); // stream-level
}
Line by line:
void SpdySession::OnStreamPadding(...)declares a function that belongs to the session object. It is called when padding is seen on a stream. Padding is extra bytes in a DATA frame that are not part of the actual content; HTTP/2 allows it, and the receiver must account for it in flow control.DecreaseRecvWindowSize(...)reduces the session's receive window by the amount of padding, because those bytes were received and must be paid for.IncreaseRecvWindowSize(...)immediately gives the credit back at the session level, because the padding is not useful data and the client has effectively consumed it. The comment// session-levelmarks that this is the session's own window, not the stream's.auto it = active_streams_.find(stream_id);looks up the stream in a table of active streams.autolets the compiler infer the type ofit, which is an iterator, a kind of cursor into a container.if (it == active_streams_.end()) return;checks whether the lookup failed.end()is the conventional "not found" marker. If the stream is gone, the function returns.it->second->OnPaddingConsumed(len);calls the stream's own padding handler. The comment// stream-levelmarks that this is the stream's window.
A padded DATA frame therefore produces two WINDOW_UPDATE enqueues: one at session level and one at stream level. The attacker exploits the difference between their thresholds. A threshold is the point at which something happens, like the level at which a float switch turns on a pump.
Step 2: Exploit the differential thresholds
The session-level WINDOW_UPDATE threshold is half of 15 MB (7.5 MB), while the stream-level threshold is half of 6 MB (3 MB). Alternatively, both levels have a time-based fallback that fires after kDefaultTimeToBufferSmallWindowUpdates (5 seconds) of inactivity. Inactivity here means that no update has been sent for that long, so the browser decides to flush what it has.
By sending exactly N SETTINGS frames, where N equals the configured session_max_queued_capped_frames limit, followed by a single padded DATA frame after the 5-second window has elapsed, the attacker arranges the following:
- The session WINDOW_UPDATE passes the overflow check, because N > N is false, bringing the queue to N+1.
- The stream WINDOW_UPDATE then fails the check, because N+1 > N is true, triggering
DoDrainSession.
SETTINGS frames are control frames that carry configuration values. The server can send SETTINGS frames, and the client must acknowledge them; the report refers to queued SETTINGS ACK frames. The trick is to fill the queue to exactly the limit with frames that are allowed, then add one more frame that pushes it over. The session-level WINDOW_UPDATE passes the overflow check, and the stream-level WINDOW_UPDATE then fails it, triggering DoDrainSession.
Because all frames arrive within a single DoReadComplete call (the entire burst is under kReadBufferSize of 8192 bytes), the write loop never has an opportunity to drain any of the queued SETTINGS ACK frames. The capped-frame count is guaranteed to be at N when the critical WINDOW_UPDATE is enqueued. A read loop reads incoming bytes; a write loop sends outgoing bytes. If everything arrives in one read, the write loop does not get a turn in between.
Step 3: Account for the default limit
The session_max_queued_capped_frames parameter defaults to 10000 and is configurable through the HTTP2 field trial (spdy_session_max_queued_capped_frames). The vulnerability exists regardless of the configured value; only the number of SETTINGS frames the attacker must send changes.
With the default value of 10000, the attacker sends 10001 SETTINGS frames (approximately 90 KB), which may span multiple DoReadComplete iterations due to the 8 KB read buffer. The write loop is unable to keep pace with the read loop's frame processing, allowing the queue to grow past the limit. At default settings the attacker can also apply TCP-level backpressure by not reading from its end of the connection, stalling the client's outbound socket and preventing any queued ACKs from being flushed. TCP is the underlying transport protocol that carries HTTP/2. Backpressure is when one side deliberately reads slowly so the other side's send buffer fills up and it has to wait. It is like a shop assistant serving customers slowly so the queue outside grows.
Step 4: Reproduce with a lowered limit
For stable reproduction in the attached PoC, the limit is set to 100 via the field trial so that the entire attack burst (100 SETTINGS plus one padded DATA frame, 1166 bytes total) fits within a single 8 KB read and triggers deterministically in one DoReadComplete call. A PoC, or proof of concept, is a small program or set of steps that demonstrates the bug. Deterministically means it happens every time, not just sometimes.
Start the malicious HTTP/2 server from the issue directory:
python3 server.py
This runs a Python script named server.py using the Python 3 interpreter. This runs the malicious HTTP/2 server script; the report does not include its contents. The report does not include the contents of server.py.
Launch Chrome in a separate terminal:
ASAN_OPTIONS=detect_odr_violation=0 ~/chromium/src/out/asan-release/chrome \
--no-sandbox --disable-gpu --ignore-certificate-errors \
--user-data-dir=/tmp/poc-$(date +%s) \
--headless=new \
--force-fieldtrials=HTTP2/Experiment/ \
--force-fieldtrial-params="HTTP2.Experiment:spdy_session_max_queued_capped_frames/100" \
https://localhost:8443/
Line by line:
ASAN_OPTIONS=detect_odr_violation=0sets an environment variable for AddressSanitizer. An environment variable is a named setting that a program reads when it starts.~/chromium/src/out/asan-release/chromeis the path to the Chrome binary built with AddressSanitizer.~means the user's home directory.--no-sandboxtells Chrome not to use its sandbox, a security boundary that restricts what a process can do.--disable-gputurns off graphics acceleration.--ignore-certificate-errorsmakes Chrome accept HTTPS certificates that it would normally reject. The command ignores certificate errors, so Chrome accepts certificates it would normally reject. A certificate is a digital identity document for a server; HTTPS uses it to prove the server is who it claims to be.--user-data-dir=/tmp/poc-$(date +%s)gives Chrome a fresh profile directory.$(date +%s)inserts the current time in seconds, so each run gets a unique directory and does not reuse cookies, cache or settings from a previous run. A profile is where Chrome stores bookmarks, history, cookies and so on.--headless=newruns Chrome without a visible window. Headless means there is no graphical interface; it is useful for automated tests.--force-fieldtrials=HTTP2/Experiment/enables a field trial namedHTTP2with a group namedExperiment. This is the mechanism that lets the command line change internal settings.--force-fieldtrial-params="HTTP2.Experiment:spdy_session_max_queued_capped_frames/100"sets the parameterspdy_session_max_queued_capped_framesto100for that trial group. This lowers the capped-frame limit from 10000 to 100.https://localhost:8443/is the URL Chrome opens.localhostmeans this computer and8443is the port in the URL Chrome opens. A port is a numbered channel on a computer, like an extension number in a phone system.
The command runs a headless Chrome instance against the local malicious server, ignoring certificate errors, with a fresh user data directory and the HTTP2 field trial parameter that lowers the capped-frame limit to 100.
Step 5: Observe the crash
The Network Service IO thread crashes with a heap-use-after-free within approximately 8 seconds. A thread is a sequence of instructions that runs inside a process; the IO thread is the one that handles input and output. A crash is when a program stops working because of an unrecoverable error.
==1795377==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c827e119d14 at pc 0x7f12fcc0c1e9 bp 0x7b1271590750 sp 0x7b1271590748
WRITE of size 4 at 0x7c827e119d14 thread T7 (Chrome_ChildIOT)
#0 0x7f12fcc0c1e8 in net::SpdyStream::IncreaseRecvWindowSize(int) net/spdy/spdy_stream.cc:289:32
#1 0x7f12fcc10913 in net::SpdyStream::OnPaddingConsumed(unsigned long) net/spdy/spdy_stream.cc:497:3
#2 0x7f12fcbd6cd4 in net::SpdySession::OnStreamPadding(unsigned int, unsigned long) net/spdy/spdy_session.cc:3032:15
#3 0x7f12fb3c9537 in http2::FrameDecoderState::ReadPadLength(http2::DecodeBuffer*, bool) net/third_party/quiche/src/quiche/http2/decoder/frame_decoder_state.cc:29:21
#4 0x7f12fb3ce259 in http2::DataPayloadDecoder::ResumeDecodingPayload(http2::FrameDecoderState*, http2::DecodeBuffer*) net/third_party/quiche/src/quiche/http2/decoder/payload_decoders/data_payload_decoder.cc:98:23
#5 0x7f12fb3ca47f in http2::Http2FrameDecoder::StartDecodingPayload(http2::DecodeBuffer*) net/third_party/quiche/src/quiche/http2/decoder/http2_frame_decoder.cc:293:32
#6 0x7f12fb3c9e29 in http2::Http2FrameDecoder::DecodeFrame(http2::DecodeBuffer*) net/third_party/quiche/src/quiche/http2/decoder/http2_frame_decoder.cc:57:16
#7 0x7f12fb3993d5 in http2::Http2DecoderAdapter::ProcessInputFrame(char const*, unsigned long) net/third_party/quiche/src/quiche/http2/core/http2_frame_decoder_adapter.cc:800:40
#8 0x7f12fb399206 in http2::Http2DecoderAdapter::ProcessInput(char const*, unsigned long) net/third_party/quiche/src/quiche/http2/core/http2_frame_decoder_adapter.cc:272:30
#9 0x7f12fcbcd528 in net::SpdySession::DoReadComplete(int) net/spdy/spdy_session.cc:2063:53
#10 0x7f12fcbcbed6 in net::SpdySession::DoReadLoop(net::SpdySession::ReadState, int) net/spdy/spdy_session.cc:1981:18
#11 0x7f12fcbc87b0 in net::SpdySession::PumpReadLoop(net::SpdySession::ReadState, int) net/spdy/spdy_session.cc:1957:17
0x7c827e119d14 is located 148 bytes inside of 648-byte region [0x7c827e119c80,0x7c827e119f08)
freed by thread T7 (Chrome_ChildIOT) here:
#0 0x560911f23ec2 in operator delete(void*, unsigned long)
#1 0x7f12fcbc19a5 in net::SpdySession::CloseActiveStreamIterator(...) net/spdy/spdy_session.cc:1855:3
#2 0x7f12fcbc3e7b in net::SpdySession::StartGoingAway(unsigned int, net::Error) net/spdy/spdy_session.cc:1396:5
#3 0x7f12fcbbd03f in net::SpdySession::DoDrainSession(...) net/spdy/spdy_session.cc:2744:5
#4 0x7f12fcbcafa6 in net::SpdySession::EnqueueSessionWrite(...) net/spdy/spdy_session.cc:2562:5
#5 0x7f12fcbc354a in net::SpdySession::SendWindowUpdateFrame(...) net/spdy/spdy_session.cc:2473:3
#6 0x7f12fcbc2f8c in net::SpdySession::SendStreamWindowUpdate(...) net/spdy/spdy_session.cc:1349:3
#7 0x7f12fcc0bf49 in net::SpdyStream::IncreaseRecvWindowSize(int) net/spdy/spdy_stream.cc:284:15
#8 0x7f12fcc10913 in net::SpdyStream::OnPaddingConsumed(unsigned long) net/spdy/spdy_stream.cc:497:3
#9 0x7f12fcbd6cd4 in net::SpdySession::OnStreamPadding(unsigned int, unsigned long) net/spdy/spdy_session.cc:3032:15
previously allocated by thread T7 (Chrome_ChildIOT) here:
#0 0x560911f232bd in operator new(unsigned long)
#1 0x7f12fcbc8c3e in net::SpdySession::CreateStream(...) gen/third_party/libc++/src/include/__memory/unique_ptr.h:756:26
This is an AddressSanitizer report. It has three parts: the error, the stack of the bad write, the stack of the free, and the stack of the original allocation. A stack trace lists the functions that were running, with the most recent call first. The numbers such as #0 are frame numbers, and the hexadecimal values are memory addresses.
- The first line says ASan detected a heap-use-after-free at address
0x7c827e119d14. Thepc,bpandspvalues are processor registers: program counter, base pointer and stack pointer. They are not needed to understand the bug. WRITE of size 4means the program tried to write 4 bytes, which matches anint32_tassignment. The thread isT7, namedChrome_ChildIOT.- The write stack starts at
IncreaseRecvWindowSizeatspdy_stream.cc:289:32, called fromOnPaddingConsumed, called fromOnStreamPadding, and so on down through the HTTP/2 frame decoder intoDoReadComplete. This is the path that performs the bad write. - The free stack shows the same memory was released by
operator delete, called fromCloseActiveStreamIterator, called fromStartGoingAway, called fromDoDrainSession, called fromEnqueueSessionWrite, called fromSendWindowUpdateFrame, called fromSendStreamWindowUpdate, called fromIncreaseRecvWindowSize. Notice that the free happens inside the sameIncreaseRecvWindowSizecall that later writes: the function calls out, the call destroys the object, and the function continues. - The allocation stack shows the memory was originally created by
operator new, called fromCreateStream. So the object was a stream, it was created normally, then freed during the same call, then written to.
The allocation stack shows the stream was created by SpdySession::CreateStream. The free stack shows it was destroyed by CloseActiveStreamIterator from StartGoingAway, called from DoDrainSession, called from EnqueueSessionWrite, called from SendWindowUpdateFrame, called from SendStreamWindowUpdate, called from IncreaseRecvWindowSize. The write stack shows the same IncreaseRecvWindowSize frame performing a 4-byte write at spdy_stream.cc:289:32 after the object was freed.
Root cause
SpdyStream::IncreaseRecvWindowSize calls session_->SendStreamWindowUpdate and then immediately writes to a member field without verifying that the stream is still alive:
// net/spdy/spdy_stream.cc
void SpdyStream::IncreaseRecvWindowSize(int32_t delta_window_size) {
// ...
if (unacked_recv_window_bytes_ > max_recv_window_size_ / 2 ||
elapsed >= session_->TimeToBufferSmallWindowUpdates()) {
last_recv_window_update_ = base::TimeTicks::Now();
session_->SendStreamWindowUpdate(
stream_id_, static_cast<uint32_t>(unacked_recv_window_bytes_));
unacked_recv_window_bytes_ = 0; // UAF write: stream may have been freed
}
}
Line by line:
void SpdyStream::IncreaseRecvWindowSize(int32_t delta_window_size)is the function that adds credit to the stream's receive window.int32_tis a 32-bit signed integer.if (unacked_recv_window_bytes_ > max_recv_window_size_ / 2 || elapsed >= session_->TimeToBufferSmallWindowUpdates())decides whether it is time to send an update. It is true if the accumulated unacknowledged bytes are more than half the maximum window, or if enough time has passed according to the session's policy.||means logical OR.last_recv_window_update_ = base::TimeTicks::Now();records the current time, so the time-based fallback can be measured from now.session_->SendStreamWindowUpdate(stream_id_, static_cast<uint32_t>(unacked_recv_window_bytes_));asks the session to send a WINDOW_UPDATE frame for this stream.static_cast<uint32_t>converts the value to an unsigned 32-bit integer, which is the type the protocol expects.unacked_recv_window_bytes_ = 0;resets the counter because the update has been sent. The comment marks this as the use-after-free write: the stream may have been freed by the call on the previous line.
The call to SendStreamWindowUpdate chains through SendWindowUpdateFrame into EnqueueSessionWrite. EnqueueSessionWrite contains a guard that synchronously drains the session when the capped-frame queue exceeds a configurable limit:
// net/spdy/spdy_session.cc
void SpdySession::EnqueueSessionWrite(...) {
// ...
if (write_queue_.num_queued_capped_frames() >
session_max_queued_capped_frames_) {
DoDrainSession(ERR_CONNECTION_CLOSED, "Exceeded max queued capped frames");
return;
}
// ...
}
Line by line:
void SpdySession::EnqueueSessionWrite(...)is the function that puts a frame into the session's outgoing queue.if (write_queue_.num_queued_capped_frames() > session_max_queued_capped_frames_)checks whether the number of capped frames waiting in the queue is greater than the configured limit.write_queue_is the queue of frames to be written.DoDrainSession(ERR_CONNECTION_CLOSED, "Exceeded max queued capped frames");closes the session with an error.ERR_CONNECTION_CLOSEDis an error code, and the string is a human-readable reason.return;stops the function immediately, so the frame is not enqueued.
DoDrainSession calls StartGoingAway, which iterates over all active streams and destroys them via CloseActiveStreamIterator and DeleteStream. The SpdyStream whose IncreaseRecvWindowSize is on the call stack is among those destroyed. When control returns to IncreaseRecvWindowSize, the assignment unacked_recv_window_bytes_ = 0 writes to freed heap memory.
Existing defences did not stop it because the WeakPtr guards in OnPaddingConsumed and OnDataReceived only cover DecreaseRecvWindowSize, not the IncreaseRecvWindowSize call that follows.
Impact
The report describes a use-after-free write in the Network Service of Chromium, reachable by any attacker who controls an HTTP/2 server the browser connects to. The write is a 4-byte store into freed heap memory. An exploitation primitive is a building block an attacker uses to turn a bug into control over a program. It notes that the issue affects all desktop and mobile platforms and requires no special GPU or hardware requirements. The severity assigned by the platform is critical.
Fix
It identifies the missing lifetime check in IncreaseRecvWindowSize as the defect and notes that the existing WeakPtr guards in OnPaddingConsumed and OnDataReceived do not cover the IncreaseRecvWindowSize call. A fix would need to revalidate the stream's lifetime after SendStreamWindowUpdate returns, or restructure the enqueue path so that draining cannot happen synchronously while a stream frame is on the stack.
Variants to test
- Other callers of
SendStreamWindowUpdateorSendWindowUpdateFramethat write to stream members after the call. A positive result is an ASan report showing a write to a freedSpdyStreamfrom a frame other than a padded DATA frame. - The
OnReadBufferConsumedpath intoIncreaseRecvWindowSize, which the report says lacks the sameWeakPtrprotection asOnDataReceived. A positive result is a use-after-free triggered by consuming buffered data rather than by padding. - Other synchronous drain triggers inside
EnqueueSessionWrite, such as different capped-frame types or other queue limits. A positive result is a stream destroyed synchronously from a frame enqueue while a stream method is on the stack. - Different values of
session_max_queued_capped_framesvia the HTTP2 field trial. A positive result is the same crash with a different number of SETTINGS frames, confirming the bug is independent of the configured limit. - TCP-level backpressure combined with the default limit of 10000, as the report describes. A positive result is the queue growing past the limit across multiple
DoReadCompleteiterations and the same use-after-free occurring without lowering the limit.
Glossary
- AddressSanitizer (ASan): a tool built into a special version of a program that detects memory errors such as use-after-free and reports them with stack traces.
- API: an interface that lets one piece of software ask another to do something, like a menu of allowed requests.
- Backpressure: a situation where one side of a connection reads slowly, causing the other side's send buffer to fill and forcing it to wait.
- Bisect: a search through a project's history, halving the range each time, to find the change that introduced a bug.
- Bounty: money paid to a researcher who reports a security bug responsibly.
- Call stack: the list of functions currently running, one inside another, with the most recent call first.
- Capped frame: a frame type that is subject to a queue limit in Chromium's HTTP/2 code; the report refers to SETTINGS acknowledgements as capped frames.
- Certificate: a digital identity document used by HTTPS to prove a server is who it claims to be.
- Chromium: the open-source browser project that Chrome is built from.
- Commit: a saved snapshot of a source code repository, identified by a long hexadecimal hash.
- Crash: an unrecoverable error that stops a program.
- CVE: a public identifier for a known security vulnerability.
- DATA frame: an HTTP/2 frame that carries response or request body bytes; it may include padding.
- Deterministic: happening the same way every time, not intermittently.
- Drain (a session): close a connection and clean up all its streams.
- Enqueue: put an item into a queue to be processed later.
- Environment variable: a named setting that a program reads when it starts.
- Exploitation primitive: a building block an attacker uses to turn a bug into control over a program.
- Field trial: a Chrome mechanism that enables or configures features remotely or from the command line without rebuilding.
- Frame: a small packet of HTTP/2 data with a type, such as DATA, SETTINGS or WINDOW_UPDATE.
- Headless: running a browser without a visible window, typically for automation.
- Heap: the pool of memory a program uses for objects it creates while running.
- HTTP/2: a set of rules for exchanging data between a browser and a server over one connection, using streams and frames.
- HTTPS: HTTP carried over an encrypted connection, usually using TLS.
- Localhost: the name for the computer you are using;
localhostwith a port refers to a service on the same machine. - Member: a variable that belongs to an object.
- Mitigation: a change that reduces the harm of a problem without necessarily removing its cause.
- Network Service: the part of Chromium that handles network connections.
- Padding: extra bytes in a DATA frame that are not part of the content; HTTP/2 requires the receiver to account for them in flow control.
- PoC (proof of concept): a small program or set of steps that demonstrates a bug.
- Port: a numbered channel on a computer that identifies a service, like an extension number.
- Profile (user data directory): the folder where Chrome stores bookmarks, history, cookies and settings.
- Sandbox: a security boundary that restricts what a process can do.
- SETTINGS frame: an HTTP/2 control frame that carries configuration values; the receiver must acknowledge it.
- SPDY: an earlier experimental protocol that led to HTTP/2; the name survives in Chromium's code.
- Stack trace: a list of the functions that were running at a particular moment, with the most recent call first.
- Stream: one request and response conversation inside an HTTP/2 connection; many streams can share one connection.
- Synchronous: happening immediately, inside the same function call, before the caller continues.
- TCP: the underlying transport protocol that carries HTTP/2 over a network.
- Thread: a sequence of instructions running inside a process.
- Threshold: the point at which something happens, such as the level that triggers an action.
- Use-after-free: a memory safety bug where a program writes to or reads from memory after it has been freed.
- WeakPtr: a pointer that does not keep an object alive and can be checked to see whether the object still exists.
- WINDOW_UPDATE frame: an HTTP/2 frame that tells the other side how much more data it may send.