Skip to content

fix: prove a moved peer endpoint before relocating routing - #106

Merged
MegaManSec merged 1 commit into
mainfrom
fix/gate-endpoint-move-behind-psk-proof
Aug 20, 2026
Merged

fix: prove a moved peer endpoint before relocating routing#106
MegaManSec merged 1 commit into
mainfrom
fix/gate-endpoint-move-behind-psk-proof

Conversation

@MegaManSec

Copy link
Copy Markdown
Owner

An unproven Bonjour resolve that echoes a peer's cleartext fp could re-point a pinned peer's host/port at an attacker-chosen machine: update(with:) treats fingerprint equality as sufficient, and fp is 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 .ping to the advertised endpoint before the record is relocated, mirroring migrateRenamedPeerIfNeeded. INTRODUCE-sourced updates carry proven: true and 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).

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.
@MegaManSec
MegaManSec merged commit 075a911 into main Aug 20, 2026
2 checks passed
@MegaManSec
MegaManSec deleted the fix/gate-endpoint-move-behind-psk-proof branch August 20, 2026 20:17
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.25.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant