• Felix Lange's avatar
    p2p/discover, p2p/discv5: prevent relay of invalid IPs and low ports · a98d1d67
    Felix Lange authored
    The discovery DHT contains a number of hosts with LAN and loopback IPs.
    These get relayed because some implementations do not perform any checks
    on the IP.
    
    go-ethereum already prevented relay in most cases because it verifies
    that the host actually exists before adding it to the local table. But
    this verification causes other issues. We have received several reports
    where people's VPSs got shut down by hosting providers because sending
    packets to random LAN hosts is indistinguishable from a slow port scan.
    
    The new check prevents sending random packets to LAN by discarding LAN
    IPs sent by Internet hosts (and loopback IPs from LAN and Internet
    hosts). The new check also blacklists almost all currently registered
    special-purpose networks assigned by IANA to avoid inciting random
    responses from services in the LAN.
    
    As another precaution against abuse of the DHT, ports below 1024 are now
    considered invalid.
    a98d1d67
Name
Last commit
Last update
.github Loading commit data...
accounts Loading commit data...
build Loading commit data...
cmd Loading commit data...
common Loading commit data...
compression/rle Loading commit data...
console Loading commit data...
containers Loading commit data...
contracts Loading commit data...
core Loading commit data...
crypto Loading commit data...
errs Loading commit data...
eth Loading commit data...
ethclient Loading commit data...
ethdb Loading commit data...
event Loading commit data...
generators Loading commit data...
internal Loading commit data...
les Loading commit data...
light Loading commit data...
logger Loading commit data...
metrics Loading commit data...
miner Loading commit data...
mobile Loading commit data...
node Loading commit data...
p2p Loading commit data...
params Loading commit data...
pow Loading commit data...
rlp Loading commit data...
rpc Loading commit data...
swarm Loading commit data...
tests Loading commit data...
trie Loading commit data...
vendor Loading commit data...
whisper Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Dockerfile Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
appveyor.yml Loading commit data...
circle.yml Loading commit data...
interfaces.go Loading commit data...
vendor.conf Loading commit data...