Repository navigation
Commit 35f34a3
net_processing: set fDisconnect instead of calling DisconnectNode
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 disconnect. Fix this by only
disconnecting the misbehaving CNode rather than every CNode sharing
the IP.
Github-Pull: #36894
Rebased-From: d63068c1 parent 1a38585 commit 35f34a3
3 files changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3867 | 3867 | | |
3868 | 3868 | | |
3869 | 3869 | | |
3870 | | - | |
| 3870 | + | |
3871 | 3871 | | |
3872 | 3872 | | |
3873 | 3873 | | |
3874 | 3874 | | |
3875 | | - | |
| 3875 | + | |
3876 | 3876 | | |
3877 | 3877 | | |
3878 | 3878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
1367 | | - | |
| 1367 | + | |
1368 | 1368 | | |
1369 | 1369 | | |
1370 | 1370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5224 | 5224 | | |
5225 | 5225 | | |
5226 | 5226 | | |
5227 | | - | |
| 5227 | + | |
5228 | 5228 | | |
5229 | 5229 | | |
5230 | | - | |
| 5230 | + | |
5231 | 5231 | | |
5232 | 5232 | | |
5233 | 5233 | | |
| |||
0 commit comments