besu icon indicating copy to clipboard operation
besu copied to clipboard

Spec non compliance issues on the Ping Packet of Discv4

Open mohasdev opened this issue 2 years ago • 0 comments

Description

There is 3 issues on the ping packet from discv4 when Besu don't respond to a ping, the issues are spec non compliance issues .

1/ Wrong To field

According to the devp2p specs and hive test, if a node send a ping with a wrong To field in the Ping packet node should respond with a Pong .

If i send a ping packet with the string : @6%!072$..;*>$5>':-6 in the To field , Besu don't respond.

2/ Wrong From field

According to the devp2p specs and hive test, if a node send a ping with a wrong From field in the Ping packet node should respond with a Pong .

If i send a ping packet with the string : .,?%@)2:%-67- in the From field , Besu don't respond.

3/ Extra data

According to the devp2p specs and hive test, if a node send a ping with extra data field in the Ping packet node should respond with a Pong .

If i send a ping packet with two additional fields with contains the string .,?%@)2:%-67- , Besu don't respond.

Steps to Reproduce

You can use the implementation of your choice and send a ping message to a Besu node, or using the devp2p binaries from geth and edit the ping message .

Or you can use D4C, a modified version of geth that send fuzzed message , just clone the repo and use this command (you need to have go in your computer) : make all

then use the corresponding commands that send a ping message :

./build/bin/devp2p discv4 wrong-to-ping <enode adress> random-fuzzer 1 ./build/bin/devp2p discv4 wrong-from-ping <enode adress> random-fuzzer 1 ./build/bin/devp2p discv4 extra-data-ping <enode adress> random-fuzzer 1

Expected behavior: [What you expect to happen] Besu node should respond to the ping .

Actual behavior: [What actually happens] Besu node don't respond to the ping.

Ressources

The expected behaviors come from :

mohasdev avatar Sep 21 '23 02:09 mohasdev