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

v2transport: restore responder handshake progress

Public commit record

What the developer wrote

Authored by Olaoluwa Osuntokun

78/100 · Adequate
v2transport: restore responder handshake progress

In this commit, we send the responder key as soon as the initiator diverges
from the v1 prefix. This avoids the BIP324 deadlock where both sides can wait
for the other to write before the initiator has sent its complete 64-byte
key.

We split key generation and key agreement into separate admission leases,
and release each lease before the intervening network I/O. The regression
test stops after the first mismatch, requires the responder to make
progress, then completes key agreement and verifies the resulting packet
ciphers interoperate.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a deadlock risk in btcd's new Bitcoin v2 transport handshake. Previously, the responder waited until it had received the initiator's full 64-byte key before doing any work, which could cause both sides to sit waiting for each other. The change makes the responder send its own key earlier, after the first byte that differs from the old v1 protocol, and splits expensive cryptographic work into two separately rate-limited phases so the CPU lock is not held across network reads or writes. It is a protocol correctness/DoS-resilience fix rather than a direct theft-of-funds bug.

Recommended action

Treat as a recommended update for operators running btcd with BIP324 v2 transport enabled, primarily for liveness/DoS-resilience. Review admission policy implementations that depend on the old single-lease behavior, as the patch now invokes Acquire twice per responder handshake. No immediate emergency response is indicated absent evidence of active exploitation.

Security signals we found

01

BIP324 handshake deadlock avoidance

02

CPU admission lease split to prevent resource exhaustion / lock holding across network I/O

03

Responder now sends key material before full initiator key is received

04

Wrong-network v1 path now generates and sends responder key before detecting mismatch, changing admission/release counts

05

New regression test enforces progress after first v1-prefix mismatch

Risk score

Why this scored 48/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 7/15
Affected reach 10/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.