Buffer overflow in Network (CVE-2026-76022)
A page combined with an attacker-controlled origin can desynchronise the HTTP cache transaction's read buffer and its stored length, so the network service issues a socket read of roughly 65 KB into a 384-byte allocation. The overflowed bytes come from the attacker's socket, and on a release build the reporter saw a 64-bit pointer take a value they chose before being dereferenced.
Originally disclosed on Chrome VRP
- Fix shipped in 14 days
Steps to reproduce the problem
-
Save the two attachments, poc.html and poc_server.py, into the same directory.
-
Run the origin: python3 poc_server.py It binds 127.0.0.1 on ports 8899-8904, plaintext HTTP/1.1.
-
Leave the tab open. Each pass caches a range on a fresh cache key, asks for a superset of that range, and fires one concurrent fetch(url, {cache:'reload'}) whose range starts above the victim's first byte.
-
Within a few minutes the network service starts dying and respawning. On an ASAN build you get heap-buffer-overflow instead; asan_report.txt is the full stack.
A few environment notes, since these cost me time:
-
It has to be cleartext HTTP/1.1. Over TLS the length hits the span check at ssl_client_socket_impl.cc:608 first, and over HTTP/2 it hits spdy_http_stream.cc:125. Either way the process stops safely and you see nothing.
-
My checkout defaults to the experimental SQL cache backend, so I forced the shipping one with --enable-features=DiskCacheBackendExperiment:backend/simple You probably don't need this. I ran both backends at identical settings and got the same rate either way: 8 memory faults per ~1040 origin requests.
-
The ASAN build was is_asan=true, is_debug=false, dcheck_always_on=false from a clean tree, run with ASAN_OPTIONS=detect_leaks=0:symbolize=1:halt_on_error=0 That gave 32 reports in 20 minutes over 8322 origin requests.
-
I reproduced on a local build of 152.0.7971.0, then read the upstream source for tag 153.0.7988.0 and for refs/heads/main. Both still have DCHECK(!reading_) in DoHeadersPhaseCannotProceed, both still leave read_buf_len_ untouched in DoCacheReadResponse, and both still have the bare read(socket_fd_, buf->data(), buf_len) in SocketPosix::DoRead.
Problem Description
I was auditing the partial-content paths in the HTTP cache and found that a page, together with an origin it controls, can get HttpCache::Transaction to issue a socket read with a length that no longer matches its buffer. The read lands ~65 KB past a 384-byte allocation in the network service, and every byte comes straight off the attacker's socket.
The buffer and its length live in separate fields. read_buf_len_ is written in exactly one place -- Transaction::Read(), http_cache_transaction.cc:334 -- and never cleared. DoCacheReadResponse() swaps read_buf_ for a small response-info-sized buffer at :1644 and leaves read_buf_len_ alone.
That only holds while no read is in flight, and the code knows it: the guard is DCHECK(!reading_) at :2420, which release builds drop. Get there mid-read and the transaction carries on with a small buffer and a large stale length. I followed the length down expecting something to catch it, and nothing does. Writers::Read copies it verbatim (http_cache_writers.cc:98-99); the stream parser reads with user_read_buf_len_ rather than the Content-Length-clamped remaining_read_len it computed a few lines above (http_stream_parser.cc:718); and it ends in the bare read() at socket_posix.cc:519.
ASAN (full stack in the crash-state field and attached):
ERROR: AddressSanitizer: heap-buffer-overflow WRITE of size 65328 at 0x613000705080 thread T9 #1 net::SocketPosix::DoRead net/socket/socket_posix.cc:519:25 0x613000705080 is located 0 bytes after 384-byte region allocated by thread T9 here: #3 net::HttpCache::Transaction::DoCacheReadResponse() net/http/http_cache_transaction.cc:1644:15
How the page gets there:
The origin serves a 206 carrying Vary: Range, a Last-Modified, and a Date at least 60s later, and deliberately no ETag. That satisfies HasStrongValidators through the Last-Modified path while leaving the ETag empty, which matters at the end.
PartialData::PrepareCacheValidation rewrites the request's Range header for each sub-range (partial_data.cc:170-173), and HttpVaryData hashes whatever the stored Vary names (http_vary_data.cc:32-45). So the vary hash agrees on the cached prefix -- the read begins, reading_ goes true -- and disagrees on the next sub-range, setting vary_mismatch_ at :3210 while the read is already in progress. ConditionalizeRequest then bails at :3310 because the ETag is empty, and DoRestartPartialRequest runs with reading_ still true.
The concurrent fetch(url, {cache:'reload', headers:{Range:'bytes=X-Y'}}) does the rest, and X has to be above 0. LOAD_BYPASS_CACHE dooms the victim's entry and installs a replacement with a hole exactly where the victim resumes, so IsCurrentRangeCached() is false at :1940 and the restarted transaction takes the network leg. That leg is the unguarded one -- had it gone to the cache, the span check there would have stopped it.
Two origin-side details are load-bearing. The response headers have to leave in their own segment, or http_stream_parser.cc:691 takes a span-guarded copy and CHECKs before anything happens. And the origin has to keep sending past Content-Length, since the socket read is sized by user_read_buf_len_ and not by the declared length.
On control: the content is verbatim socket data. On a non-ASAN release build I changed the payload byte and watched the faulting address follow it -- 'V' (0x56) gives SEGV_ACCERR 0x5656565656565656, 'B' (0x42) gives 0x4242424242424242. A 64-bit pointer ends up holding a value I picked, and then gets dereferenced. The length is whatever read size the victim page used, 65536 in my runs, against a 384-byte allocation.
Two things I should say plainly. I stopped at the overflow and made no attempt at exploitation, so I can't tell you whether it is exploitable. And my builds have PA_BUILDFLAG_INTERNAL_USE_PARTITION_ALLOC_AS_MALLOC() == 0 -- system malloc, not PartitionAlloc -- which changes the heap layout around the overflow, though not whether the write happens.
Additional Comments
Same root cause, other sinks. The stale length also reaches PartialData::CacheRead and PartialData::CacheWrite -- the second is an out-of-bounds read of the same buffer. Both are bounded by base::span checks today and abort cleanly, so as things stand they are not a memory-safety problem. One more is not bounded: CacheBodyDecompressor::DoDecompress builds ZSTD_outBuffer{output_buf->data(), output_buf_len, 0} at cache_body_decompressor.cc:104, where output_buf_len is the same stale length and output_buf is the swapped buffer, so zstd gets a raw pointer with the wrong capacity. It is unreachable right now -- kHttpCacheZstdCompression and kHttpCacheZstdDecompression are off by default, and ShouldCompressForCache() also wants did_use_shared_dictionary (http_cache_writers.cc:727+). I mention it because turning cache compression on would make this same desync corrupt memory through that path, without anyone touching the cache code.
I also went looking for a disclosure primitive and did not find one. If the page could read back bytes past the buffer that were not its own, that would be network-service heap handed to JavaScript. Over 2418 requests I saw 137 responses larger than the 384-byte buffer, and every byte was my own payload -- zero foreign bytes. The out-of-bounds region gets filled by the same read(2) that overflows it, so reading it back just returns the attacker's own data. This looks like a write primitive only.
On fixing it: clearing read_buf_len_ where read_buf_ is swapped in DoCacheReadResponse() is the direct fix, or keeping the buffer and its length in one object so they can't drift apart. Promoting the DCHECK at :2420 to a CHECK would turn this into a controlled abort, but the desync would still be there.
Summary
Heap buffer overflow in network service: stale read_buf_len_ in HttpCache::Transaction
Custom Questions
Type of crash:
Utility process, the network service. The browser and the tab survive; the network service dies and is respawned, repeatedly for as long as the page is open.
Crash state:
AddressSanitizer, from a build with is_asan=true, is_debug=false, dcheck_always_on=false on a clean tree. Frames resolved with third_party/llvm-build/.../llvm-symbolizer. No registers or exception record: ASAN aborts before a crash dump is written. Full report attached as asan_report.txt.
==78489==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x613000705080 at pc 0x0001052c0810 bp 0x00030a8926b0 sp 0x00030a891e70 WRITE of size 65328 at 0x613000705080 thread T9 #1 net::SocketPosix::DoRead(net::IOBuffer*, int) net/socket/socket_posix.cc:519:25 #2 net::SocketPosix::ReadIfReady(net::IOBuffer*, int, base::OnceCallback<void (int)>) #3 net::SocketPosix::RetryRead(int) #5 net::SocketPosix::OnFileCanReadWithoutBlocking(int) #6 base::MessagePumpKqueue::ProcessEvents(...) #12 content::(anonymous namespace)::ChildIOThread::Run(base::RunLoop*)
0x613000705080 is located 0 bytes after 384-byte region [0x613000704f00,0x613000705080) allocated by thread T9 here: #1 net::IOBufferWithSize::IOBufferWithSize(unsigned long) #2 base::MakeRefCounted<net::IOBufferWithSize, int&>(int&) #3 net::HttpCache::Transaction::DoCacheReadResponse() net/http/http_cache_transaction.cc:1644:15 #4 net::HttpCache::Transaction::DoLoop(int) #5 net::HttpCache::Transaction::OnCacheIOComplete(int) #8 net::HttpCache::ProcessAddToEntryQueue(...) #9 net::HttpCache::OnProcessQueuedTransactions(...)
Reporter credit:
0xAlessandro
Additional Data
Category: Security
Chrome Channel: Not sure
Regression: N/A \
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a stale read_buf_len_ left over when DoCacheReadResponse swaps read_buf_ for a smaller buffer mid-read, with only a DCHECK guarding the in-flight read and no length reset.
Impact
The network service crashes and respawns repeatedly, and on a release build a 64-bit pointer can be made to hold an attacker-chosen value and be dereferenced, though the reporter made no attempt at exploitation and notes the heap layout differs on their system-malloc builds; over TLS or HTTP/2 the process stops safely instead.
What the attacker needed
Victim visits attacker page; attacker-controlled origin server; plaintext HTTP/1.1 (not TLS or HTTP/2); tab left open for several minutes
The fix
The direct fix is to clear read_buf_len_ where read_buf_ is swapped in DoCacheReadResponse, or to keep the buffer and its length in one object so they cannot drift apart.
How it was found
- Place the proof-of-concept page and the local origin server script in one directory.
- Start the origin server, which listens on localhost over plaintext HTTP/1.1.
- Open the proof-of-concept page in the browser and leave the tab open.
- The page repeatedly caches a range, requests a superset of it, and fires a concurrent reload fetch whose range starts above the victim's first byte.
- Within minutes the network service crashes and respawns, or an ASAN build reports a heap-buffer-overflow.
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 program keeps a buffer (a fixed-size block of memory) and a separate number saying how many bytes to read into it. Here the buffer was swapped for a much smaller one but the number was not updated, so the program wrote far more data than the small block could hold, spilling into neighbouring memory. The data written comes from a server the attacker runs, so they control what lands outside the buffer.
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.