nim-eth/tests/p2p
Kim De Mey aa92ad4f42
discv4: Fix assert on invalid RLP list in Neighbours message (#763)
The assert would occur when the rlp size of the a node in the
nodes rlp list is incorrectly set too high and then the next
`listElem` call for the next node will start from the
incorrect data. When that data is not a list the assert in
`listElem` will be triggered.

Fixed by adding a `listLen` call which checks if it is a list.
Added also more strictness by:
- Checking if that list is of len 4, which it must be
- raising immediatly on invalid IP length
- raising immediatly on invalid public key / node id

+ test cases
2024-12-02 09:38:00 +01:00
..
all_discv5_tests.nim discv5: migrate to minilru (#741) 2024-10-03 12:34:38 +02:00
all_tests.nim remove unusued rlpx features, tighten hello exchange and some error h… (#759) 2024-11-05 16:30:41 +01:00
config.nims CI: test with multiple Nim version (#429) 2021-12-11 19:12:55 +01:00
discv5_test_helper.nim Align core types with execution spec (#733) 2024-09-29 10:52:19 +02:00
eth_protocol.nim Align core types with execution spec (#733) 2024-09-29 10:52:19 +02:00
p2p_test_helper.nim Align core types with execution spec (#733) 2024-09-29 10:52:19 +02:00
test_auth.nim devp2p: drop pre-EIP8 support, fix snappy negotiation (#758) 2024-11-02 08:15:40 +01:00
test_crypt.nim remove unusued rlpx features, tighten hello exchange and some error h… (#759) 2024-11-05 16:30:41 +01:00
test_discovery.nim discv4: Fix assert on invalid RLP list in Neighbours message (#763) 2024-12-02 09:38:00 +01:00
test_discoveryv5.nim fix potential infinite loop in randomNodes (#754) 2024-10-24 17:24:53 +02:00
test_discoveryv5_encoding.nim Align core types with execution spec (#733) 2024-09-29 10:52:19 +02:00
test_ecies.nim Align core types with execution spec (#733) 2024-09-29 10:52:19 +02:00
test_enode.nim rm Goerli bootnodes (#746) 2024-10-09 10:34:47 +00:00
test_enr.nim Align core types with execution spec (#733) 2024-09-29 10:52:19 +02:00
test_hkdf.nim CI: test with multiple Nim version (#429) 2021-12-11 19:12:55 +01:00
test_ip_vote.nim Align core types with execution spec (#733) 2024-09-29 10:52:19 +02:00
test_protocol_handlers.nim devp2p: upgrade to v5 (EIP-706) (#760) 2024-11-08 03:44:04 +01:00
test_rlpx_thunk.json devp2p: upgrade to v5 (EIP-706) (#760) 2024-11-08 03:44:04 +01:00
test_rlpx_thunk.nim Using unsigned types for message type and requst IDs (#722) 2024-08-30 17:27:09 +00:00
test_rlpxtransport.nim remove unusued rlpx features, tighten hello exchange and some error h… (#759) 2024-11-05 16:30:41 +01:00
test_routing_table.nim Align core types with execution spec (#733) 2024-09-29 10:52:19 +02:00