Skip to content

SEC-41 Peer TD in NewBlockMsg not verified #604

Closed
@Gustav-Simonsson

Description

@Gustav-Simonsson

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions