Skip to content

fix(fleet-proxy): bound repetition in the response reader (#6509) - #6998

Merged
dezren39 merged 1 commit into
mainfrom
queue/11388-6509-fleet-proxy-repetition-bounds
Nov 8, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/11388-6509-fleet-proxy-repetition-bounds

Conversation

@dezren39

@dezren39 dezren39 commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Bound repetition in the fleet-proxy response reader (issue #6509, Phase 2 of design #6582). The reader capped unit sizes (MAX_LINE_BYTES, MAX_RESPONSE_BODY_BYTES) but not repetition: the 1xx interim-head loop in request(), the header-line loop in read_response_head(), and the trailer-line loop in read_chunked() each consumed peer-controlled units forever, hanging the exchange and its pooled tunnel.

  • New named count bounds in pkgs/fleet/crates/fleet-proxy/src/http.rs: MAX_INTERIM_HEADS (16), MAX_HEADER_LINES (256), MAX_TRAILER_LINES (256) — sized generously above legitimate laptop-service behaviour.
  • Exceeding a bound returns HttpError::Malformed and marks the connection non-reusable, matching the existing size-cap failure shape.
  • Module doc now names the count bounds alongside the size bounds.
  • Tests: flood tests for all three loops (interim heads / header lines / trailer lines all fail Malformed + non-reusable) plus control cases (single interim head then final response; chunked body with trailers round-trips and stays reusable).

Evidence

  • cargo test -p fleet-proxy — all suites pass (lib 65/65; http module 24/24 including the 5 new tests).
  • cargo fmt -p fleet-proxy -- --check — passes.

Merge Danger

Door: Two-way

Blast Radius: Low — one file in fleet-proxy; bounds are far above any legitimate local-service response shape, and the failure shape (Malformed, non-reusable) is the one the reader already uses for size caps.

Fixes #6509

🤖 Queue worker lane code-o, task 11388 (triage of record: task 11196).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 8, 2026 00:34
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: db515609-deba-44c2-b678-d0d8d8dab9d8
Commits

Reviewing files that changed from the base of the PR and between b9edeb7 and 5adf350.

Files selected for processing: 1

  • pkgs/fleet/crates/fleet-proxy/src/http.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T00:35:35.690417Z 5adf350 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant