Closed
Description
When a NewBlockMsg message is handled, it's TD field is compared to the current best peer, and if the TD is higher this peer is set as best peer, if it's not the best already.
The TD is not verified, allowing a malicious peer to become the best peer by advertising a high TD.
The TD field can be removed from the NewBlockMsg type and instead be calculated from the received block, after PoW and other initial validations are done.
https://github.com/ethereum/go-ethereum/blob/develop/eth/protocol.go#L292
https://github.com/ethereum/go-ethereum/blob/develop/blockpool/peers.go#L270