Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add QA test for malformed peerLists #3971

Closed
mitsuaki-u opened this issue Jul 16, 2019 · 1 comment
Closed

Add QA test for malformed peerLists #3971

mitsuaki-u opened this issue Jul 16, 2019 · 1 comment
Assignees
Milestone

Comments

@mitsuaki-u
Copy link
Contributor

mitsuaki-u commented Jul 16, 2019

Expected behavior

Add test to check that lisk-p2p properly handles peerLists loaded with potentially invalid P2PPeerInfo.

Actual behavior

There are no QA tests for this behavior. This feature did not exist prior to v2.3.

Which version(s) does this affect? (Environment, OS, etc...)

2.3

@mitsuaki-u mitsuaki-u changed the title Add QA test for possible malicious peerLists passed from attackers Add QA test for malformed peerLists Aug 5, 2019
@sridharmeganathan sridharmeganathan added this to the Sprint 4 milestone Aug 7, 2019
@ishantiw ishantiw self-assigned this Aug 16, 2019
@ishantiw
Copy link
Contributor

After testing using one of the nodes from the Alpha network and making it return malformed peerinfo like broadhash malformed of other peers and adding a field with an array of strings values. I made API calls to other nodes to check if they are showing the malformed peerInfo but it doesn’t because when we connect with any peer we update the peerInfo only when it is coming from that peer only.
http://104.248.152.50:4000/api/peers?limit=100
image

As of now, we only add peers from discovery to the PeerBook on connect event and whenever we are connecting we are also updating peerInfo by asking the status. This makes it very difficult to do any IP poisoning or sending malformed peerInfo. So the version is resilient against malformed peerInfo and Ip poisoning.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants