Skip to content

fix(gateway): reject any gateway node's key on every node - #1604

Merged
kvinwang merged 1 commit into
nextfrom
fix/gateway-reject-gateway-keys
Nov 18, 2026
Merged

kvinwang merged 1 commit into
nextfrom
fix/gateway-reject-gateway-keys

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Import compared an instance record's WireGuard key only with this node's own key, and registration checked no gateway key at all. A CVM could register on node A with node B's key: every node accepted the record except B, so the nodes disagreed on which instances exist.

accept_instances now also takes the gateway keys from the replicated node/info records (KvStore::gateway_wg_public_keys), and a record carrying one loses on every node; registration refuses such keys too. The instance reload also wakes on node/ changes, so learning a peer's key later updates the decision.

No format change; only bogus records are affected. Found by the Lean model of import (#1597, IpAlloc.lean, gateway_key_record_diverges).

@kvinwang
kvinwang enabled auto-merge November 18, 2026 08:46
@kvinwang
kvinwang force-pushed the fix/gateway-reject-gateway-keys branch from 962e630 to ce8f543 Compare November 18, 2026 10:03
@kvinwang
kvinwang merged commit c83973a into next Nov 18, 2026
21 checks passed
@kvinwang
kvinwang deleted the fix/gateway-reject-gateway-keys branch November 18, 2026 10:11
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.

1 participant