Skip to content

Commit

Permalink
fix(comms/dht): fixes invalid peer ban on invalid encrypted msg signa…
Browse files Browse the repository at this point in the history
…ture (#4519)

Description
---
- fixes invalid ban of source peer on the encrypted message signature, which can only be validated by the sender (#4339 ) 
- add two additional unit tests for this case

Motivation and Context
---
Ref #4339 
Previously, a sender may send a message with an invalid encrypted signature that cannot be validated and rejected by intermediate nodes. On receipt by the sender, an invalid signature is encountered and previously this would result in sending peer being banned. This PR changes this to only discard the message. The sender is only banned if unencrypted header data is malformed/invalid.

How Has This Been Tested?
---
New unit tests + existing tests + manually (no breaking changes)
  • Loading branch information
sdbondi committed Aug 24, 2022
1 parent 3f60c44 commit 7a2c95e
Show file tree
Hide file tree
Showing 5 changed files with 289 additions and 95 deletions.
Loading

0 comments on commit 7a2c95e

Please sign in to comment.