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

Merge bitcoin/bitcoin#36676: cli: respect -rpcclienttimeout even when sending

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36676: cli: respect -rpcclienttimeout even when sending

e5d9a7e04b50c723aeb65984e5048ffd098f6737 cli: fail to send a request when the socket does not become writable (Antoine Poinsot)

Pull request description:

The move away from libevent introduced a small regression in this regard. In #36299, we switched the timeout to apply per socket wait, but continued on to another socket wait in case of timeout, instead of returning. See commit message for details.

In general, we also shouldn't ignore `Sock::Wait`'s errors and timeouts by silently retrying forever.

Fix these issues by returning instead when `Sock::Wait` times out or returns an error. ~~Tentative bot functional test for this in second commit that appears to be robust enough.~~

ACKs for top commit:
jpk68:
ACK e5d9a7e04b50c723aeb65984e5048ffd098f6737
l0rinc:
tested ACK e5d9a7e04b50c723aeb65984e5048ffd098f6737
pinheadmz:
ACK e5d9a7e04b50c723aeb65984e5048ffd098f6737

Tree-SHA512: f662e911fbba2d2a97e9d9ba559e8cfd8fd163a08ba8ff812f969c9ea42f0d24d5e013a558a2b488c346f9d5611a2faba0e2ade780ba9b290124fb441ac771ff
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This patch fixes a bug in bitcoin-cli (the command-line tool used to talk to a Bitcoin node) where the -rpcclienttimeout setting was not being respected while sending a request. Previously, if the network socket was not ready to send data, the tool would wait, time out, then silently try again in an infinite loop. Now it correctly gives up and reports failure. This is primarily a reliability and user-expectation bug rather than a direct theft-of-funds vulnerability.

Recommended action

Treat as a low-severity reliability/hardening fix. No emergency response is warranted. Users and downstream packagers should include this patch in their next routine update. Operators relying on -rpcclienttimeout for automation should verify timeout behavior after upgrading.

Security signals we found

01

Denial-of-service vector: unbounded retry loop on socket wait timeout/error could hang bitcoin-cli indefinitely

02

Configuration bypass: -rpcclienttimeout was effectively ignored during the send phase

03

Error-handling hardening: Sock::Wait errors and timeouts are now propagated instead of retried

04

Regression fix introduced by prior libevent removal

Risk score

Why this scored 34/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/10
Evidence quality 4/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.