fix: prove a moved peer endpoint before relocating routing - #106
Open
MegaManSec wants to merge 1 commit into
Open
fix: prove a moved peer endpoint before relocating routing#106MegaManSec wants to merge 1 commit into
MegaManSec wants to merge 1 commit into
Conversation
A Bonjour resolve echoing a peer's cleartext `fp` could re-point a pinned peer's host/port at an attacker-chosen machine, since `update(with:)` treats fp equality as sufficient. Gate same-id endpoint moves from unproven (Bonjour) resolves behind a PSK-proof ping, mirroring `migrateRenamedPeerIfNeeded`; INTRODUCE-sourced updates stay immediate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An unproven Bonjour resolve that echoes a peer's cleartext
fpcould re-point a pinned peer'shost/portat an attacker-chosen machine:update(with:)treats fingerprint equality as sufficient, andfpis public multicast any LAN listener can copy. Requires winning the peer's mDNS name (peer asleep/off-air). Impact is bounded — the PSK handshake still gates all command/peripheral delivery — but the routing pointer and reachability flag can be poisoned transiently.Fix: same-id endpoint moves from an unproven Bonjour resolve now require a PSK-proof
.pingto the advertised endpoint before the record is relocated, mirroringmigrateRenamedPeerIfNeeded. INTRODUCE-sourced updates carryproven: trueand still relocate immediately. Legit IP/port changes still follow, one round-trip later.Not build-verified locally (only Command Line Tools installed, no full Xcode).