AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 43 Bitcoin

HTTPServer: disconnect clients

Public commit record

What the developer wrote

Authored by Matthew Zipkin

35/100 · Opaque
HTTPServer: disconnect clients
✓ Descriptive subject! No meaningful explanatory body
The short version

What changed, and why it matters

This commit finishes the Bitcoin Core HTTP server's ability to actually close client connections. Before, several error paths had 'TODO: disconnect' comments, meaning misbehaving or finished clients could stay connected longer than intended. The change adds flags and a periodic cleanup routine so the server drops clients after errors, oversized requests, malformed requests, EOF, non-keep-alive responses, and during shutdown. It is best read as a robustness/cleanup improvement rather than a single critical vulnerability fix, though leaving connections hanging can waste resources and, in some designs, be abused.

Recommended action

Treat as a hardening/robustness improvement. Review whether any of the newly disconnected error paths were previously reachable by unauthenticated RPC users and could have been abused for resource exhaustion. Monitor follow-up commits for any edge cases around m_connection_busy races during worker-thread shutdown. No immediate emergency response is indicated by the diff alone.

Security signals we found

01

Replaces multiple TODO: disconnect stubs with actual disconnection logic

02

Adds HTTP 413 Content Too Large response and disconnect on oversized request bodies

03

Adds HTTP 400 Bad Request response and disconnect on request parse failures

04

Disconnects on permanent socket send errors and EOF/recv errors

05

Closes non-keep-alive connections after response buffer is flushed

06

Adds graceful shutdown path that waits for in-flight responses before disconnecting

07

Removes temporary CloseConnection() test-only API

Risk score

Why this scored 43/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 6/15
Affected reach 7/15
Confidence 7/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.