Repository navigation
server: a body no route reads is capped at 64 KiB - #3029
Merged
Merged
Conversation
ashhart
marked this pull request as ready for review
November 12, 2026 17:30
Every request that is not a POST had its body read before routing, up to 32 MiB, with no key. Such a body is read only to keep the connection in step, so it now has a 64 KiB cap of its own.
ashhart
force-pushed
the
security/unread-body-cap
branch
from
November 13, 2026 00:01
5be4994 to
c535a9b
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.
What this changes
Before: a request that is not a POST had its body read before routing, up to 32 MiB, with no key. After: a body no route reads has a 64 KiB cap of its own, and a larger one gets HTTP 400.
SECURITY.mdasks for private reports, so there is no public issue.atc overlap --json: not run.Checks on this head
5be49942f09646bfd81d31804ee9b04180ac03ddpython3 tools/zig/lean_check.py, on the base and on this head: 345 on the base, 345 on this head, 0 new.zig fmt --checkon 2 files: passesgit diff --check: passeszig build test-server-cpu: 5/5 steps succeeded; 1325/1332 tests passed (7 skipped)zig build check-native-cuda-host compile-flashnext-mtp-parity-host compile-glm-native-open: 11/11 steps succeededzig build test-golden test-server-security test-pull-security: 76/76 steps succeeded; 23/23 tests passedzig/tests/server/security_check.py, which runs against the built server.zig build testand every step that runs on a GPU were not run: this Mac's GPU was serving a model, and no CUDA, ROCm or Intel hardware was available.Receipt
n/a. This change cannot reach inference: it is HTTP body framing for routes that read no body.
Checklist
zig build test-server-security: exit 1.FAIL GET body of 65537 bytes against the unread cap: expected [400], got [200].Suggested changelog line
Server: a request body that no route reads is capped at 64 KiB.