Repository navigation
Bound JSON reads from peers and fail closed when a peer's pin is gone - #27
Merged
Merged
Conversation
HTTP timeouts bounded how long a read could take, not how much JSON it could buffer. A peer or manual node could make the scanner, manual-nodes, the error store or the engine manager parse an arbitrarily large answer. - node-info answers: 1 MiB (scanner, manual nodes) - model inventories: 16 MiB (scanner, manual nodes) - the oMLX proxy's loopback-only 403 body: 64 KiB (manual nodes) - error-store ingest: 1 MiB, refused with 400 - remote engine progress streams: 1 MiB per NDJSON frame, so a long operation still reports progress for as long as it runs A value past its limit follows the existing failure path. Adapted from NVIDIA#167, extended to this fork's manual-node probes (oMLX, engine-manager models). Co-authored-by: Kaylee Lubick <kjlubick@users.noreply.github.com> Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
A peer candidate is resolved only while this node holds its certificate pin, but the pin can be removed between resolution and dial. The proxies then fell back to a transport with no pinned TLS configuration, relying on the system roots to reject the peer's self-signed certificate. Return a transport whose every dial fails with errPeerUnpinned instead, so a vanished pin is an explicit refusal in all three proxies. From NVIDIA#79. That PR's 32 MiB request-body cap is not ported: upstream's maintainers rejected rejecting large bodies in favour of a disk-spooling design that has not landed, and the plaintext ingress is loopback-only. Co-authored-by: Mallikh Kalkere <mkalkere@users.noreply.github.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/request-bounds
branch
from
November 2, 2026 18:45
2c9fdc4 to
8ba779e
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
Two hardening changes:
errPeerUnpinned.Adapted from NVIDIA#167 and the fail-closed part of NVIDIA#79. That PR's 32 MiB request-body cap is not ported: upstream's maintainers rejected rejecting large bodies in favour of a disk-spooling design that hasn't landed.
Scope
nvpair-node-scanner,nvpair-manual-nodes,nvpair-errors,nvpair-engine-manager/remoteclient.go, the three proxies.Validation
go test ./...in all seven modules, with new tests for each limit and for the unpinned dial.Risk
Low; real answers are far below the limits. Bumps: scanner 1.2.1, manual-nodes 1.2.2, errors 1.1.1, engine-manager 1.4.0, ollama/lmstudio-proxy 1.4.1, omlx-proxy 1.4.2.
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.