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

Merge bitcoin/bitcoin#36894: net_processing: set fDisconnect instead of calling DisconnectNode

Public commit record

What the developer wrote

Authored by merge-script

81/100 · Strong
Merge bitcoin/bitcoin#36894: net_processing: set fDisconnect instead of calling DisconnectNode

d63068c58ec9fcc94876bce30865d1a7266d64d4 net_processing: set fDisconnect instead of calling DisconnectNode (Eugene Siegel)

Pull request description:

`MaybeDiscourageAndDisconnect` calls `DisconnectNode` which creates a `CSubNet` containing only the `CNode`'s address. This will disconnect every `CNode` with the same IP address. This is normally not a problem, except for clearnet-over-tor. If a node has an honest clearnet-over-tor inbound connection, the IP of the inbound peer will be the exit node's IP address. If an attacker connects to the node through the same exit node and sends an invalid message, they can cause every inbound peer sharing the exit node's IP to get disconnected. Fix this by only disconnecting the misbehaving `CNode` rather than every `CNode` sharing the IP.

ACKs for top commit:
Husteem:
Approach ACK / tACK d63068c
maflcko:
lgtm ACK d63068c58ec9fcc94876bce30865d1a7266d64d4
ajtowns:
re utACK d63068c58ec9fcc94876bce30865d1a7266d64d4
darosior:
utACK d63068c58ec9fcc94876bce30865d1a7266d64d4

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

What changed, and why it matters

This change fixes a bug where Bitcoin Core would disconnect every peer sharing the same IP address when one peer misbehaved. The problem is especially bad for users connecting through Tor, because all Tor traffic exits through a small set of public 'exit nodes.' An attacker could use the same Tor exit node as honest users, send an invalid message, and get every honest inbound peer using that exit node kicked off. The fix makes the node disconnect only the specific misbehaving connection while still discouraging (reducing trust in) that IP address.

Recommended action

Apply the patch. Operators running listening nodes that accept inbound Tor connections should upgrade, as they are the primary targets of the described disconnection attack. No immediate workaround is described.

Security signals we found

01

Denial of service via shared IP disconnect

02

Tor exit-node IP collision exploited to disconnect honest peers

03

Peer-to-peer network isolation of inbound connections

04

Fix narrows disconnect scope from subnet to single CNode

Risk score

Why this scored 68/100

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