Repository navigation
Reject unsafe peer identifiers in the trust store - #25
Merged
Merged
Conversation
The trusted-node store joined a peer's UUID straight into a file path. The UUID comes from the network — a pairing exchange or a roster entry another trusted member endorsed — so a crafted identifier such as "../identity" could make a roster merge write a pin outside trusted/, overwriting this node's identity.json. Validate identifiers before deriving pin paths: reject empty identifiers, dot components, either platform's separators, Windows drive/stream syntax, NUL bytes and native reserved names. Load skips such files; Pin and Remove refuse them without touching disk or announcing a change. Ported from NVIDIA/Personal-AI-Router@c299135 (NVIDIA#159). The tests are adapted to this fork's test layout. Co-authored-by: Kaylee Lubick <kjlubick@users.noreply.github.com> Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
JaredP94
force-pushed
the
fix/truststore-path-safety
branch
from
November 2, 2026 18:36
773efbf to
9d892e9
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
The trusted-node store joined a peer's UUID straight into a file path. That UUID comes from the network — a pairing exchange or a roster entry another trusted member endorsed — so an identifier like
../identitycould make a roster merge write outsidetrusted/, overwriting this node'sidentity.json.Identifiers are now validated before any pin path is derived: empty,
./.., either platform's separators, Windows drive/stream syntax, NUL and reserved device names are refused, without touching disk or announcing a change. Load skips such files.Ported from NVIDIA/Personal-AI-Router@c299135 (NVIDIA#159); tests adapted to this fork's layout.
Scope
services/nvpair-cluster-manager/truststore.goand README.Validation
go test ./...innvpair-cluster-manager. The five new tests fail with the check stubbed out and pass with it.Risk
Low: real identifiers are v4 UUIDs.
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.