QUIC Send Buffer Residue Infinite Loop · Issue #24004 · curl/curl · GitHub
Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert QUIC Send Buffer Residue Infinite Loop #24004 New issue Copy link New issue Copy link Closed Closed QUIC Send Buffer Residue Infinite Loop #24004 Copy link Assignees Labels HTTP/3 h3 or quic related h3 or quic related vuln:NONE Vulnerability assessed and deemed insignificant Vulnerability assessed and deemed insignificant Description Shaunak-Chatterjee opened on Nov 17, 2026 Issue body actions Description In curl's HTTP/3 (QUIC) write path send_packet_no_gso() in lib/vquic/vquic.c:385 , p += gsolen is used for the loop's progress pointer.
When queued packet bytes remain from a previous partially-failed flush but no active packet size gsolen is available (residue empty state), the loop degenerates to p += 0 — an infinite loop on platform QUIC code paths that have no_gso=TRUE . /* lib/vquic/vquic.c:385-398 */ for ( p = pkt ; p < end ; p += gsolen ) { /* BAD: gsolen can be 0 -> no progress */ if ( send_packet_no_gso_do ( cf , data , qctx , p , CURLMIN ( gsolen , ...), & sent ) ...
Trigger Sequence A QUIC server is slow/closes idle or the link has congestion A Curl_vquic_flush is attempted but sendto returns EWOULDBLOCK/EAGAIN The partially-consumed bytes remain in the send buffer but are marked sent internally ( pktcnt = 0 ) On retry, Curl_vquic_send(*cf, sendbuf, ..., gsolen=0) is called with sendbuf_bytes > 0 but pktcnt = 0 and gsolen = 0 The loop spins until the socket is closed by timeout or watchdog Chain of Control (PoC Snippet) // Test harness to confirm the loop:harness-config.c (DEBUGBUILD) setenv ( "CURL_DBG_QUIC_WBLOCK" , "1" , 1 ); /* artificially force WBLOCK */ /* Then perform a transfer against a local server that drops one ACK */ /* curl -V http3 will freeze CPU 100% at this point */ A production PoC on macOS using a malicious HTTP/3 server is attached / can be Constructed.
Impact Analysis Stakeholder Impact libcurl HTTP/3 users on macOS/Windows Infinite CPU loop in background daemons / transfer threads; application might restart flakes CI / CD systems Build/test pipelines hang indefinitely Embedded / IoT devices Critical, can brick devices if watchdog restarts the app Any update agent / fetcher using HTTP/3 over QUIC Circuit breaker / timeout does not terminate the loop Availability vs Direct Damage The direct impact on a running libcurl application is process-level CPU saturation and subsequent process termination (usually by watchdog).
Read/write corruption is not possible because the loop does not write memory. However, for unattended high-availability services that rely on curl-based transfers (update agents, backup daemons, federated search), restart cycles become triggered by any HTTP/3 server-induced transfer failure on affected platforms — that's a persistent DoS against those specific endpoints. Remediation /* Bugfix for lib/vquic/vquic.c:385 */ if ( gsolen == 0 ) gsolen = pktlen ; /* Fall back: send entire packet as one datagram */ Additionally in do_sendmsg() (vquic.c:316-321), the retry path should resync gsolen to the packet length before re-calling send_packet_no_gso() .
RT-03_QUIC_gsolen_infinite_loop.md I expected the following No response curl/libcurl version curl / libcurl 8.23.1-DEV (commit 307f084 ) operating system Mac OS Activity bagder added HTTP/3 h3 or quic related h3 or quic related vuln:ASSESS Vulnerability problem? If so, what severity? Vulnerability problem? If so, what severity? on Nov 17, 2026 bagder commented on Nov 17, 2026 bagder on Nov 17, 2026 Member More actions Sounds like a possible bug to me, not a vulnerability. bagder added vuln:NONE Vulnerability assessed and deemed insignificant Vulnerability assessed and deemed insignificant and removed vuln:ASSESS Vulnerability problem?
If so, what severity? Vulnerability problem? If so, what severity? on Nov 17, 2026 icing self-assigned this on Nov 17, 2026 icing commented on Nov 17, 2026 icing on Nov 17, 2026 Contributor More actions Thanks for the report. I propose to fix this via #24008 . Would be great if you could verify! bagder closed this as completed in d342e8e on Nov 17, 2026 jhauga added a commit that references this issue on Nov 17, 2026 quic: when sending without GSO, check lengths This issue will close once commit d342e8e is merged into the 'master' branch. d342e8e dkarpov1970 added a commit that references this issue on Nov 18, 2026 quic: when sending without GSO, check lengths This issue will close once commit 1c26984 is merged into the 'master' branch.
1c26984 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Metadata Metadata Assignees icing Labels HTTP/3 h3 or quic related h3 or quic related vuln:NONE Vulnerability assessed and deemed insignificant Vulnerability assessed and deemed insignificant Type No type Projects No projects Milestone No milestone Relationships None yet Development No branches or pull requests Issue actions You can’t perform that action at this time.