Repository navigation
Reject out-of-order pairing messages - #24
Merged
Merged
Conversation
A pairing message that arrives out of order could crash either side or grant trust without the PIN: - The inviter checked a Completion MAC against an empty key when the message arrived before the PIN was applied. An empty-key MAC over the public transcript is computable without the PIN, so it could reach Registered. - A key-exchange message sent before negotiation dereferenced the algorithm negotiation selects, panicking either role. - The joiner accepted EAP-Success in any state, storing an association without verifying the server's Completion MAC. Completion now requires derived keys, in Waiting or (peer-to-server direction) OOBReceived. Key exchange requires negotiation. EAP-Success is accepted only directly after a verified Completion request. Ported from NVIDIA#184 (6c8fa90, 4f8b050 and the Success guard from 6a752f6), adapted to this fork's eap-noob, which still supports the peer-to-server direction. Co-authored-by: Kaylee Lubick <klubick@nvidia.com> Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
…l error A pairing message that panicked inside the joiner left its session mutex locked, so expiry could never reclaim it; repeating that could exhaust the pending-session slots until restart. A terminal protocol error also left its session behind. Scope the joiner's message handling with a deferred unlock, delete the session on terminal protocol errors as well as processing errors, and notify after unlocking. Ported from NVIDIA#184 (4f8b050). Co-authored-by: Kaylee Lubick <klubick@nvidia.com> Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
JaredP94
force-pushed
the
fix/pairing-state-guards
branch
from
November 2, 2026 18:22
8b07749 to
f8d49a4
Compare
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.
Description
Out-of-order pairing messages could crash either side or grant trust without the PIN:
Completion now requires derived keys (Waiting, or OOBReceived in the peer-to-server direction this fork still supports); key exchange requires negotiation; EAP-Success is accepted only right after a verified Completion. A terminal protocol error releases the joiner's session.
Ported from NVIDIA#184 (6c8fa90, 4f8b050, and the Success guard from 6a752f6). That PR's wider API cleanup is not included.
Scope
services/eap-noob,services/nvpair-cluster-manager/httpserver.go. No wire change.Validation
go test ./...ineap-noobandnvpair-cluster-manager. The new inviter test reproduced the nil-pointer panic before the guard.services/tests: allcluster_manager_test.goandtls_test.gocases (pairing, wrong PIN both sides, cancel/decline/expiry, fan-out, leave) — 23 passed.Risk
Low. Valid pairings follow the same path; only messages that were never valid in that state are refused.
nvpair-cluster-manager2.1.0 → 2.1.1.Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.json, and described user-visible changes above so they reach the release notes.Part of the upstream issue/PR review. Each branch is independent off
main; they all bumpservices/versions.json, so the second one merged will need a trivial conflict resolution there.