Skip to content

Fix: signer identity validation for signed PeerRecords#1339

Open
sumanjeet0012 wants to merge 4 commits into
libp2p:mainfrom
sumanjeet0012:kademlia_issue
Open

Fix: signer identity validation for signed PeerRecords#1339
sumanjeet0012 wants to merge 4 commits into
libp2p:mainfrom
sumanjeet0012:kademlia_issue

Conversation

@sumanjeet0012

Copy link
Copy Markdown
Contributor

What was wrong?

Fixes #1338

KadDHT accepted signed PeerRecords where the signer identity did not match record.peer_id.

Although the envelope signature was valid, the signer public key embedded in the envelope could derive to a different peer ID than the one claimed in the record payload.

This allowed authenticated but incorrectly bound peer records to poison the certified address book for arbitrary peer IDs.

How was it fixed?

Added signer identity binding validation before accepting signed peer records.

The fix enforces:

signer_peer_id = ID.from_pubkey(envelope.public_key)

Records with mismatched signer identities are now rejected before they can update certified peer addresses.

To-Do

  • Clean up commit history
  • Add or update documentation related to these changes
  • Add entry to the release notes

Cute Animal Picture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KadDHT accepts signed PeerRecords with mismatched signer identity

1 participant