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

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

A use-after-free occurs in Chromium's network service when SpdyStream::QueueNextDataFrame calls CreateDataBuffer, which synchronously enqueues a PrefacePing that drains the session and destroys the calling stream, leaving a stale data pointer that is then dereferenced. An attacker could trigger a heap use-after-free crash in the network service process from a web page without a compromised renderer.

cinzinga Follow

Originally disclosed on Chrome VRP

Bounty$43,000 Critical View original
  • Fix shipped in 30 days

Report description

SpdyStream Use-After-Free in QueueNextDataFrame via PrefacePing drain


Bug location

Where do you want to report your vulnerability?

Chrome VRP – Report security issues affecting the Chrome browser. See program rules

Which URL (or repository) have you found the vulnerability in?

https://source.chromium.org/chromium/chromium/src/+/main:net/spdy/spdy_stream.cc


The problem

Please describe the technical details of the vulnerability

SpdyStream::QueueNextDataFrame() calls SpdySession::CreateDataBuffer() with pending_send_data_.get(). For non-empty DATA frames, CreateDataBuffer() calls MaybeSendPrefacePing(). If that PING enqueue sees more than session_max_queued_capped_frames queued capped frames (default 10000), EnqueueSessionWrite() synchronously calls DoDrainSession().

The drain destroys the calling SpdyStream, including its pending_send_data_ DrainableIOBuffer. Control then returns to CreateDataBuffer(), which continues with the stale data pointer and calls data->data() while constructing the DATA frame.

The attached PoC is tuned to avoid the previous reproduction race. It uses one HTTPS/HTTP2 origin, no mixed-content control plane, no manual pause/start endpoints, and an automatic server-side read pause after all flow streams and the bulk POST headers are observed.

Default PoC math:
streams=240
full cycles=41
final partial cycle streams=119
stream WINDOW_UPDATE frames = 41 * 240 + 119 = 9959
connection WINDOW_UPDATE frames = 41 full cycles + 1 partial cycle = 42
total capped frames queued before trigger = 9959 + 42 = 10001

After the 10001 capped frames are queued client-side, the page waits 11500ms to satisfy the PrefacePing idle gate, then sends 1024 bytes on the trigger POST body. That body enters QueueNextDataFrame(), reaches CreateDataBuffer(), attempts to enqueue PrefacePing, drains the session, destroys the calling SpdyStream, and crashes when CreateDataBuffer() resumes with the stale data pointer.

Steps to Reproduce

  1. Save poc.html and server.py in the same folder
  2. pip3 install h2
  3. python3 server.py
  4. Launch Chromium directly to the server URL (https://localhost:8443/poc.html). Do not open poc.html as a file:// URL. Accept the self-signed HTTPS certificate.
~/chromium/src/out/ASan/Chromium.app/Contents/MacOS/Chromium https://localhost:8443/poc.html
  1. Wait approximately 4 minutes then ASan reports:
==80749==ERROR: AddressSanitizer: heap-use-after-free on address 0x60400069a460 at pc 0x0003793905e0 bp 0x00016fbb5490 sp 0x00016fbb5488
READ of size 8 at 0x60400069a460 thread T9
    #0 net::SpdySession::CreateDataBuffer(...)
    #1 net::SpdyStream::QueueNextDataFrame()
    #2 net::SpdyStream::SendData(...)
[...]
MiraclePtr Status: NOT PROTECTED

Crash Evidence

Chromium 149.0.7813.0 (Developer Build, ASan) (arm64) - macOS 15 (Apple M5)

  • Attached asan_symbolized.txt

Chrome Stable 147.0.7727.101 - Android 16 (Pixel 10, arm64)

  • Attached android_tombstone.txt showing NetworkService SIGTRAP and chrome://crashes ID 056da228154b34fe

Chrome Dev 149.0.7806.0 - Android 16 (Pixel 10, arm64)

  • chrome://crashes ID 21e0879a6b27018d

Proposed Fix

Do not call MaybeSendPrefacePing() from inside SpdySession::CreateDataBuffer() while CreateDataBuffer() holds raw pointers into the calling SpdyStream. Move the PrefacePing enqueue to a point where the caller can guard SpdyStream lifetime with a WeakPtr before passing pending_send_data_.get(), or otherwise make CreateDataBuffer() verify stream/data lifetime after MaybeSendPrefacePing() before dereferencing data. A post-call guard in QueueNextDataFrame() alone is insufficient because the stale data pointer is dereferenced inside CreateDataBuffer().

Bisect

Introduced by commit 410676ab9660a (HTTP2 DoS Mitigations, 2019-08-13), which added the synchronous drain in EnqueueSessionWrite() when the capped-frame queue exceeds the configured limit.

Impact analysis

  • Web-reachable, no compromised renderer required.
  • Heap use-after-free in the network service process.
  • Default HTTP/2 configuration; no special feature flags required.

The cause

What version of Chrome have you found the security issue in?

149.0.7813.0 (Developer Build) (arm64)

Is the security issue related to a crash?

Yes, it is related to a crash.

Choose the type of vulnerability

Memory Corruption (in a sandboxed process)

How would you like to be publicly acknowledged for your report?

cinzinga

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

Chrome's network service speaks HTTP/2 through the SPDY stack in net/spdy. The file at the centre of this report is spdy_stream.cc, which implements SpdyStream, the per-stream object that owns the stream's send state, including pending_send_data_, a DrainableIOBuffer holding the body bytes waiting to go out.

When a stream has data to send, SpdyStream::QueueNextDataFrame() builds the next DATA frame. To do that it calls SpdySession::CreateDataBuffer() and passes it pending_send_data_.get(). For non-empty DATA frames, CreateDataBuffer() calls MaybeSendPrefacePing(). That PING is a session-level mechanism, and enqueueing it can, under a specific queue condition, synchronously tear down the session and every stream on it, including the stream that is still inside CreateDataBuffer().

The report is a Chrome VRP submission by cinzinga, rated critical, with a bounty of 43,000 USD, disclosed on 2026-05-27. The weakness class is use after free, the affected asset is Network, and the crash was reproduced on a developer build of Chrome 149.0.7813.0 (arm64) on macOS, and on stable and dev builds on Android.

Setup

The reproduction needs a local HTTPS/HTTP2 origin and a Chromium build with AddressSanitizer. The researcher used:

  • Chromium 149.0.7813.0 (Developer Build, ASan) (arm64) on macOS 15 (Apple M5), which produced the symbolised ASan report.
  • Chrome Stable 147.0.7727.101 on Android 16 (Pixel 10, arm64), which produced a tombstone showing a NetworkService SIGTRAP and a chrome://crashes ID.
  • Chrome Dev 149.0.7806.0 on Android 16 (Pixel 10, arm64), which produced a second chrome://crashes ID.

The PoC consists of two files, poc.html and server.py, saved in the same folder. The server side needs the Python h2 package. The page must be loaded over HTTPS from the server, not as a file:// URL, and the self-signed certificate must be accepted.

The PoC was deliberately tuned to avoid a race that affected an earlier reproduction. It uses a single HTTPS/HTTP2 origin, no mixed-content control plane, no manual pause or start endpoints, and an automatic server-side read pause once all flow streams and the bulk POST headers have been observed.

Finding it

The defect is a lifetime problem between two functions in the same call chain. QueueNextDataFrame() hands CreateDataBuffer() a raw pointer into the calling stream's pending_send_data_. Inside CreateDataBuffer(), for a non-empty DATA frame, MaybeSendPrefacePing() is called. If the PING enqueue observes more than session_max_queued_capped_frames queued capped frames (default 10000), EnqueueSessionWrite() synchronously calls DoDrainSession().

The drain destroys the calling SpdyStream, and with it the pending_send_data_ DrainableIOBuffer. Control then returns to CreateDataBuffer(), which carries on with the now stale data pointer and calls data->data() while constructing the DATA frame. That dereference is the use after free.

The queue threshold is what makes the bug reachable from a page: the capped-frame queue must be above the limit, and a DATA send must then enter the send path on a live stream.

Exploitation

The PoC drives the session to exactly one frame over the cap, waits out the PrefacePing idle gate, and then sends a small body on a trigger POST so that the send path enters QueueNextDataFrame() and CreateDataBuffer() while the queue is already over the limit.

The frame arithmetic is stated explicitly in the report:

  • streams = 240
  • full cycles = 41
  • final partial cycle streams = 119
  • stream WINDOW_UPDATE frames = 41 * 240 + 119 = 9959
  • connection WINDOW_UPDATE frames = 41 full cycles + 1 partial cycle = 42
  • total capped frames queued before trigger = 9959 + 42 = 10001

So the page arranges for 10001 capped frames to be queued client-side, one more than the default limit of 10000. It then waits 11500ms to satisfy the PrefacePing idle gate, and sends 1024 bytes on the trigger POST body. That body enters QueueNextDataFrame(), reaches CreateDataBuffer(), attempts to enqueue the PrefacePing, drains the session, destroys the calling SpdyStream, and crashes when CreateDataBuffer() resumes with the stale data pointer.

Step 1: Prepare the two files

Save poc.html and server.py in the same folder. The page is served by the Python server over HTTPS on port 8443.

Step 2: Install the HTTP/2 dependency

Bash
pip3 install h2

This installs the Python HTTP/2 library that server.py uses to speak HTTP/2 to the browser.

Step 3: Start the server

Bash
python3 server.py

The server listens on https://localhost:8443 with a self-signed certificate. It performs the automatic read pause once it has observed all flow streams and the bulk POST headers.

Step 4: Launch Chromium against the page

Bash
~/chromium/src/out/ASan/Chromium.app/Contents/MacOS/Chromium https://localhost:8443/poc.html

Launch the browser directly at the server URL. Do not open poc.html as a file:// URL. Accept the self-signed HTTPS certificate when prompted.

Step 5: Wait for the crash

Wait approximately 4 minutes. ASan then reports:

Text
==80749==ERROR: AddressSanitizer: heap-use-after-free on address 0x60400069a460 at pc 0x0003793905e0 bp 0x00016fbb5490 sp 0x00016fbb5488
READ of size 8 at 0x60400069a460 thread T9
    #0 net::SpdySession::CreateDataBuffer(...)
    #1 net::SpdyStream::QueueNextDataFrame()
    #2 net::SpdyStream::SendData(...)
[...]
MiraclePtr Status: NOT PROTECTED

The stack confirms the path described above: SendData() calls QueueNextDataFrame(), which calls CreateDataBuffer(), and the faulting read happens inside CreateDataBuffer() on the freed buffer. The report's ASan output ends with the line MiraclePtr Status: NOT PROTECTED.

Crash evidence on other builds

The same issue was observed outside the ASan developer build:

  • Chrome Stable 147.0.7727.101 on Android 16 (Pixel 10, arm64): a tombstone showing a NetworkService SIGTRAP, with chrome://crashes ID 056da228154b34fe.
  • Chrome Dev 149.0.7806.0 on Android 16 (Pixel 10, arm64): chrome://crashes ID 21e0879a6b27018d.

Root cause

SpdySession::CreateDataBuffer() calls MaybeSendPrefacePing() while it holds raw pointers into the calling SpdyStream. The PING enqueue path can synchronously drain the session when the capped-frame queue exceeds session_max_queued_capped_frames, and the drain destroys the calling stream and its pending_send_data_ buffer. CreateDataBuffer() then dereferences the stale pointer with data->data().

The bisect points to commit 410676ab9660a (HTTP2 DoS Mitigations, 2019-08-13), which added the synchronous drain in EnqueueSessionWrite() when the capped-frame queue exceeds the configured limit. That commit added the synchronous drain in EnqueueSessionWrite() when the capped-frame queue exceeds the configured limit.

A guard placed only after the call in QueueNextDataFrame() would not be enough, because the stale data pointer is dereferenced inside CreateDataBuffer() itself, before control returns to the caller.

Impact

The report describes the issue as web-reachable with no compromised renderer required. It is a heap use after free in the network service process, under the default HTTP/2 configuration, with no special feature flags needed. The crash was reproduced on the developer ASan build, and Android stable and dev builds produced a tombstone and crash IDs.

Fix

The report proposes not calling MaybeSendPrefacePing() from inside SpdySession::CreateDataBuffer() while CreateDataBuffer() holds raw pointers into the calling SpdyStream. The PrefacePing enqueue should move to a point where the caller can guard the SpdyStream lifetime with a WeakPtr before passing pending_send_data_.get(), or CreateDataBuffer() should verify the stream and data lifetime after MaybeSendPrefacePing() before dereferencing data. As noted above, a post-call guard in QueueNextDataFrame() alone is insufficient.

Variants to test

  • Other synchronous teardown paths reachable from inside a send or buffer-construction function. Look for any call that can enqueue a session-level frame and, on a queue condition, drain the session. A positive result is an ASan heap-use-after-free whose stack shows the drain below the buffer construction frame.
  • Other callers that pass raw pointers into a stream-owned buffer across a call that can re-enter the session. A positive result is a stale pointer dereference after the callee returns.
  • The same capped-frame queue threshold reached through different frame types (for example, flow-control frames from many streams versus connection-level frames). A positive result is the queue crossing session_max_queued_capped_frames and the next send on a live stream crashing.
  • The PrefacePing idle gate timing. Vary the wait before the trigger body and check whether the crash still occurs; a positive result is a crash at a different wait, showing the gate is a timing condition rather than a fix.
  • Other builds and platforms, including non-ASan release builds, to see whether the freed object is caught by MiraclePtr. A positive result is a crash or tombstone on a build where the ASan report is unavailable.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 14 min read.

What happened, in plain words

Chrome is made of several parts that run side by side. One of them is the network service: a separate program that does the actual talking to websites (fetching pages, sending form data, and so on). It is kept apart from the part that draws pages on your screen, so that a bug in one does not automatically give an attacker control of the other. This report is about a bug inside that network service.

When Chrome talks to a modern website, it usually uses a protocol called HTTP/2. A protocol is just an agreed set of rules for how two computers exchange messages. HTTP/2 lets one connection carry many conversations at once, and each conversation is called a stream. Chrome's code for HTTP/2 lives in a part of its source tree called net/spdy (SPDY was an earlier name for the ideas that became HTTP/2).

The file at the centre of this report is spdy_stream.cc. It contains the code for SpdyStream, the object that represents one stream. Each stream keeps track of the data it still has to send. That pending data sits in a buffer called pending_send_data_, which is a DrainableIOBuffer: a small container of bytes that can be read out a piece at a time.

The bug is a use after free. In programming languages like C++, the programmer has to ask the computer for memory and later give it back. A use after free happens when a program gives memory back (frees it) and then keeps using it as if it were still there. It is like handing back a library book, then reading from it after the librarian has put it on the shelf for someone else. Sometimes nothing bad happens; often the program crashes; and in the worst case an attacker can arrange for the freed memory to be filled with their own data and influence what the program does next.

Here is the sequence in one breath. A stream wants to send some data, so it asks a session-level function to build the next chunk of data (a DATA frame). While building it, that function may decide to send a small keep-alive message called a PING. Sending that PING can, under a specific condition, cause the whole session to be torn down immediately, which destroys the stream that is still in the middle of the call. When the function returns to its work, it carries on using the buffer that was just destroyed. That is the use after free.

The report is a submission to the Chrome Vulnerability Reward Program (Chrome VRP), Google's scheme that pays people for finding and reporting security bugs in Chrome. It was written by a researcher credited as cinzinga, rated critical, with a bounty of 43,000 USD, and disclosed on 2026-05-27. The weakness class is use after free, the affected asset is Network, and the crash was reproduced on a developer build of Chrome 149.0.7813.0 (arm64) on macOS, and on stable and dev builds on Android.

Setup

To reproduce the bug you need two things: a small web server on your own machine that speaks HTTPS and HTTP/2, and a special build of Chromium (the open-source browser Chrome is built from) that has AddressSanitizer switched on. AddressSanitizer, usually shortened to ASan, is a tool built into a debug build that watches memory use and shouts loudly, with a detailed report, the moment a program touches memory it should not. Normal release builds do not have it, which is why the researcher used a developer build.

The researcher used three setups:

  • Chromium 149.0.7813.0 (Developer Build, ASan) (arm64) on macOS 15 (Apple M5), which produced the symbolised ASan report.
  • Chrome Stable 147.0.7727.101 on Android 16 (Pixel 10, arm64), which produced a tombstone showing a NetworkService SIGTRAP and a chrome://crashes ID. A tombstone is Android's crash log; a SIGTRAP is a signal the operating system sends when a program hits a breakpoint-like fault, often used by crash handlers.
  • Chrome Dev 149.0.7806.0 on Android 16 (Pixel 10, arm64), which produced a second chrome://crashes ID. chrome://crashes is a built-in Chrome page that lists recent crash reports and gives each one an ID.

The PoC (proof of concept, the small program that demonstrates the bug) consists of two files, poc.html and server.py, saved in the same folder. The server side needs the Python h2 package, a library that lets Python speak HTTP/2. The page must be loaded over HTTPS from the server, not as a file:// URL, and the self-signed certificate must be accepted. A self-signed certificate is a security certificate the server makes for itself instead of buying one from a trusted authority; browsers warn about it, and you have to click through the warning.

The PoC was deliberately tuned to avoid a race, a situation where two things happen at almost the same time and the result depends on which wins. An earlier version of the reproduction had such a race, and this version removes it. It uses a single HTTPS/HTTP2 origin, no mixed-content control plane, no manual pause or start endpoints, and an automatic server-side read pause once all flow streams and the bulk POST headers have been observed. In plain terms: the page talks to one server only, it does not mix secure and insecure content, it does not rely on you clicking buttons to pause or start anything, and the server itself stops reading from the connection at the right moment so that the client-side queue does not get emptied too early.

Finding it

The defect is a lifetime problem between two functions in the same call chain. A call chain is simply one function calling another, which calls another, and so on, like a stack of plates. QueueNextDataFrame() hands CreateDataBuffer() a raw pointer into the calling stream's pending_send_data_. A raw pointer is just a memory address with no safety net: nothing checks that the memory it points at still exists.

Inside CreateDataBuffer(), for a non-empty DATA frame, MaybeSendPrefacePing() is called. A DATA frame is the part of an HTTP/2 message that carries the actual body bytes. A PING is a small control message used to check that the other side is still there. If the PING enqueue observes more than session_max_queued_capped_frames queued capped frames (default 10000), EnqueueSessionWrite() synchronously calls DoDrainSession(). "Synchronously" means it happens right there and then, before the current function returns, not later in the background. "Capped frames" are frames the session has decided to limit in number to protect itself from being flooded.

The drain destroys the calling SpdyStream, and with it the pending_send_data_ DrainableIOBuffer. Control then returns to CreateDataBuffer(), which carries on with the now stale data pointer and calls data->data() while constructing the DATA frame. That dereference is the use after free. To dereference a pointer is to follow the address and read or write the memory it points at; doing that on freed memory is exactly the bug.

The queue threshold is what makes the bug reachable from a page: the attacker only has to get the session's capped-frame queue above the limit and then trigger a DATA send on a stream that is still alive at the moment of the call. In other words, a web page can reach this code path without a compromised renderer.

Exploitation

The PoC drives the session to exactly one frame over the cap, waits out the PrefacePing idle gate, and then sends a small body on a trigger POST so that the send path enters QueueNextDataFrame() and CreateDataBuffer() while the queue is already over the limit. The idle gate is a condition that says the PING is only sent if the connection has been quiet for a while; the PoC waits long enough to satisfy it.

The frame arithmetic is stated explicitly in the report:

  • streams = 240
  • full cycles = 41
  • final partial cycle streams = 119
  • stream WINDOW_UPDATE frames = 41 * 240 + 119 = 9959
  • connection WINDOW_UPDATE frames = 41 full cycles + 1 partial cycle = 42
  • total capped frames queued before trigger = 9959 + 42 = 10001

A WINDOW_UPDATE frame is a flow-control message: it tells the other side "you may send me this many more bytes". Flow control exists so that a fast sender cannot drown a slow receiver. The PoC opens many streams and keeps sending these small flow-control messages until the queue is just over the limit.

So the page arranges for 10001 capped frames to be queued client-side, one more than the default limit of 10000. It then waits 11500ms to satisfy the PrefacePing idle gate, and sends 1024 bytes on the trigger POST body. That body enters QueueNextDataFrame(), reaches CreateDataBuffer(), attempts to enqueue the PrefacePing, drains the session, destroys the calling SpdyStream, and crashes when CreateDataBuffer() resumes with the stale data pointer.

Step 1: Prepare the two files

Save poc.html and server.py in the same folder. The page is served by the Python server over HTTPS on port 8443.

Step 2: Install the HTTP/2 dependency

Bash
pip3 install h2

This installs the Python HTTP/2 library that server.py uses to speak HTTP/2 to the browser. pip3 is Python's package installer; h2 is the name of the library. Without it, the server script would fail as soon as it tried to handle an HTTP/2 connection.

Step 3: Start the server

Bash
python3 server.py

The server listens on https://localhost:8443 with a self-signed certificate. localhost means "this same computer", and 8443 is the port the server listens on. It performs the automatic read pause once it has observed all flow streams and the bulk POST headers.

Step 4: Launch Chromium against the page

Bash
~/chromium/src/out/ASan/Chromium.app/Contents/MacOS/Chromium https://localhost:8443/poc.html

Launch the browser directly at the server URL. The long path is simply where the ASan build of Chromium lives on the researcher's Mac; ~/chromium/src/out/ASan/ is the build output folder. Do not open poc.html as a file:// URL. Accept the self-signed HTTPS certificate when prompted.

Step 5: Wait for the crash

Wait approximately 4 minutes. ASan then reports:

Text
==80749==ERROR: AddressSanitizer: heap-use-after-free on address 0x60400069a460 at pc 0x0003793905e0 bp 0x00016fbb5490 sp 0x00016fbb5488
READ of size 8 at 0x60400069a460 thread T9
    #0 net::SpdySession::CreateDataBuffer(...)
    #1 net::SpdyStream::QueueNextDataFrame()
    #2 net::SpdyStream::SendData(...)
[...]
MiraclePtr Status: NOT PROTECTED

Line by line:

  • ==80749==ERROR: AddressSanitizer: heap-use-after-free on address 0x60400069a460 ... is ASan announcing the bug class (heap-use-after-free) and the memory address involved. The pc, bp and sp values are processor register values at the moment of the fault, useful to a developer but not needed to understand the bug.
  • READ of size 8 at 0x60400069a460 thread T9 says the program tried to read 8 bytes from that address, on a background thread numbered T9.
  • #0 net::SpdySession::CreateDataBuffer(...) is the innermost function, the one that actually did the bad read.
  • #1 net::SpdyStream::QueueNextDataFrame() is the function that called it.
  • #2 net::SpdyStream::SendData(...) is the function that called that one.
  • [...] means the rest of the stack was trimmed for brevity.
  • MiraclePtr Status: NOT PROTECTED records that the freed object was not covered by MiraclePtr, Chrome's own safety mechanism that tries to make some use-after-free bugs harmless. Here it did not apply.

The stack confirms the path described above: SendData() calls QueueNextDataFrame(), which calls CreateDataBuffer(), and the faulting read happens inside CreateDataBuffer() on the freed buffer.

Crash evidence on other builds

The same issue was observed outside the ASan developer build:

  • Chrome Stable 147.0.7727.101 on Android 16 (Pixel 10, arm64): a tombstone showing a NetworkService SIGTRAP, with chrome://crashes ID 056da228154b34fe.
  • Chrome Dev 149.0.7806.0 on Android 16 (Pixel 10, arm64): chrome://crashes ID 21e0879a6b27018d.

These show the issue was also observed outside the ASan developer build.

Root cause

SpdySession::CreateDataBuffer() calls MaybeSendPrefacePing() while it holds raw pointers into the calling SpdyStream. The PING enqueue path can synchronously drain the session when the capped-frame queue exceeds session_max_queued_capped_frames, and the drain destroys the calling stream and its pending_send_data_ buffer. CreateDataBuffer() then dereferences the stale pointer with data->data().

The bisect points to commit 410676ab9660a (HTTP2 DoS Mitigations, 2019-08-13), which added the synchronous drain in EnqueueSessionWrite() when the capped-frame queue exceeds the configured limit. A bisect is a way of finding which code change introduced a bug by testing versions in the middle of a range and narrowing down. A commit is a single recorded change to the source code. DoS stands for denial of service: an attack that aims to make a service unavailable rather than to steal data. That commit added the synchronous drain in EnqueueSessionWrite() when the capped-frame queue exceeds the configured limit. "Re-entrant" means a function can end up running again, or running other code, before it has finished its own work.

A guard placed only after the call in QueueNextDataFrame() would not be enough, because the stale data pointer is dereferenced inside CreateDataBuffer() itself, before control returns to the caller. A guard here means a check such as "is this object still alive?" before using it.

Impact

The report describes the issue as web-reachable with no compromised renderer required. The renderer is the part of Chrome that draws pages; a compromised renderer is one an attacker has already broken into. Here the attacker does not need that: a normal web page is enough. It is a heap use after free in the network service process, under the default HTTP/2 configuration, with no special feature flags needed. The crash was reproduced on the developer ASan build, and Android stable and dev builds produced a tombstone and crash IDs.

Fix

The report proposes not calling MaybeSendPrefacePing() from inside SpdySession::CreateDataBuffer() while CreateDataBuffer() holds raw pointers into the calling SpdyStream. The PrefacePing enqueue should move to a point where the caller can guard the SpdyStream lifetime with a WeakPtr before passing pending_send_data_.get(), or CreateDataBuffer() should verify the stream and data lifetime after MaybeSendPrefacePing() before dereferencing data. A WeakPtr is a pointer that does not keep an object alive but can tell you whether the object still exists. As noted above, a post-call guard in QueueNextDataFrame() alone is insufficient.

Variants to test

  • Other synchronous teardown paths reachable from inside a send or buffer-construction function. Look for any call that can enqueue a session-level frame and, on a queue condition, drain the session. A positive result is an ASan heap-use-after-free whose stack shows the drain below the buffer construction frame.
  • Other callers that pass raw pointers into a stream-owned buffer across a call that can re-enter the session. A positive result is a stale pointer dereference after the callee returns.
  • The same capped-frame queue threshold reached through different frame types (for example, flow-control frames from many streams versus connection-level frames). A positive result is the queue crossing session_max_queued_capped_frames and the next send on a live stream crashing.
  • The PrefacePing idle gate timing. Vary the wait before the trigger body and check whether the crash still occurs; a positive result is a crash at a different wait, showing the gate is a timing condition rather than a fix.
  • Other builds and platforms, including non-ASan release builds, to see whether the freed object is caught by MiraclePtr. A positive result is a crash or tombstone on a build where the ASan report is unavailable.

Glossary

  • AddressSanitizer (ASan): a debugging tool built into special builds that detects memory errors such as use after free and prints a detailed report.
  • Bisect: a method of finding the code change that introduced a bug by testing versions in the middle of a range and narrowing down.
  • Capped frames: frames the session limits in number to protect itself from being flooded.
  • Chrome VRP: Google's Chrome Vulnerability Reward Program, which pays researchers for reporting security bugs.
  • Commit: a single recorded change to source code, identified by a hash such as 410676ab9660a.
  • DATA frame: the part of an HTTP/2 message that carries the actual body bytes.
  • Dereference: to follow a pointer to the memory it points at and read or write it.
  • DoS (denial of service): an attack that aims to make a service unavailable rather than to steal data.
  • DrainableIOBuffer: a buffer of bytes that can be read out a piece at a time.
  • Flow control: a mechanism that stops a fast sender from drowning a slow receiver, using WINDOW_UPDATE messages.
  • Guard: a check such as "is this object still alive?" before using it.
  • Heap: the area of memory a program uses for objects it creates while running.
  • HTTP/2: a modern protocol for exchanging web messages, allowing many streams over one connection.
  • Idle gate: a condition that only allows an action (here, the PING) after the connection has been quiet for a while.
  • MiraclePtr: Chrome's own safety mechanism that tries to make some use-after-free bugs harmless.
  • Network service: the separate part of Chrome that does the actual network communication.
  • PING: a small HTTP/2 control message used to check that the other side is still there.
  • PoC (proof of concept): a small program that demonstrates a bug.
  • Race: a situation where two things happen at almost the same time and the result depends on which wins.
  • Raw pointer: a memory address with no safety net; nothing checks that the memory still exists.
  • Re-entrant: a function can end up running again, or running other code, before it has finished its own work.
  • Renderer: the part of Chrome that draws pages on screen.
  • Self-signed certificate: a security certificate a server makes for itself instead of buying one from a trusted authority.
  • SPDY: an earlier protocol whose ideas became HTTP/2; the name survives in Chrome's net/spdy folder.
  • Stream: one conversation within an HTTP/2 connection.
  • Synchronous: happens right there and then, before the current function returns.
  • Tombstone: Android's crash log.
  • Use after free: a bug where a program gives memory back and then keeps using it as if it were still there.
  • WeakPtr: a pointer that does not keep an object alive but can tell you whether the object still exists.
  • WINDOW_UPDATE frame: a flow-control message saying "you may send me this many more bytes".

More by cinzinga

View all

8 more disclosed reports, best first.

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.