Repository navigation
fix(security): bound HTTP requests and protect web admin sessions - #28
Merged
Merged
Conversation
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.
The built-in HTTP parser could allocate from a declared body size and then copy a larger TCP chunk. The authenticated Web Console also rendered player-controlled markup and logged bearer cookies; password changes left existing browser cookies valid.
Bound server requests to16KiB headers/64KiB body, validate framing/methods/length arithmetic, reserve NUL termination and reject excess data. Parse bounded cookies, escape untrusted Web text while retaining trusted color spans, revoke browser sessions on password/credential changes, add SameSite=Strict, remove bearer logging and omit remote command arguments from logs by default. Outbound HTTP client/download implementation is unchanged.
Validation: actual-function ASan/UBSan tests for fragmented/malformed requests, allocation boundary/excess, cookies and boundedHTML; actual password-reset revocation and RCON log canaries. Build and83 tests pass(oneoptional skip). Independent security reviewer reran tests, caught/corrected malformed-method parsing, and approved final focused source/local scope. See docs/security/http-web-boundaries.md.
Remaining audit gaps include active SourceTCP session revocation, absolute/idle Web expiry, complete CSRF policy and administrator hierarchy checks; these are not claimed fixed. Current production TCP RCON/Web is not publicly published/SGallowed, but latent source flaws must be fixed before exposure/bridge activation. No production exploits, deployment, merge, credential rotation or bridge enabling. Require mandatory CI and manual owner review.