Skip to content

fix(network): bound chunked relay memory - #3537

Merged
pimlock merged 1 commit into
mainfrom
bounded-chunked-relay/pimlock
Sep 22, 2026
Merged

pimlock merged 1 commit into
mainfrom
bounded-chunked-relay/pimlock

Conversation

@pimlock

@pimlock pimlock commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

🔧 security-fix-agent

Summary

Bound memory used while relaying HTTP/1 chunked bodies. Chunk payloads now pass through a fixed 8 KiB buffer, while chunk framing and trailers have explicit limits.

Related Issue

No public issue. This change addresses a privately tracked security finding under the repository security-reporting policy.

Changes

  • Stream chunk payloads without retaining the declared chunk in a growable buffer
  • Limit chunk-size lines to 16 KiB
  • Limit trailer blocks to 16 KiB and 128 fields
  • Add regression tests for incomplete maximal chunks and framing limits
  • Document the chunked-relay limits in the sandbox resource model

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (not applicable; the parser boundary is covered by unit tests)
  • cargo test -p openshell-supervisor-network --lib
  • mise run test (blocked by missing host mke2fs or mkfs.ext4 in five unrelated VM-driver tests)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@pimlock pimlock added the topic:security Security issues label Sep 22, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@pimlock pimlock added the test:e2e Requires end-to-end coverage label Sep 22, 2026
@pimlock

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Label test:e2e applied, but pull-request/3537 does not exist yet. A maintainer needs to comment /ok to test e03c6ddb0b8638866c98fa3242fe65a9e935d45f to mirror this PR. Once the mirror exists, re-apply the label or re-run Branch E2E Checks from the Actions tab.

@pimlock
pimlock marked this pull request as ready for review September 22, 2026 15:14

@pimlock pimlock left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

This focused change bounds memory in the raw HTTP/1 chunked relay without introducing a blocking correctness or security issue. The required current-head checks, including the E2E suite, are green; maintainer approval is the remaining gate.

Blocking findings:

  • No blocking findings remain

Carried findings:

  • None

Non-blocking suggestions:

  • Narrow the new egress-framing limits row to the raw pass-through relay, or align the credential-inspected streaming relay with the same chunk-line and trailer limits; that alternate path currently has different bounds.
Gator metadata
  • Validation: Focused network-relay security fix with a clear threat, bounded implementation, regression coverage, and architecture documentation.
  • Docs: Architecture limits documentation updated; no direct user-facing CLI, API, policy, or workflow change requires Fern docs.
  • Checks: Required current-head checks are green, including Branch Checks, Helm Lint, and Trivy Changes.
  • E2E: test:e2e is applied and OpenShell / E2E succeeded.
  • Head SHA: e03c6ddb0b8638866c98fa3242fe65a9e935d45f
  • Base SHA: 99ed6a9df09a70981accfd39fe234fa1a648a93c
  • Merge base SHA: 99ed6a9df09a70981accfd39fe234fa1a648a93c
  • Patch ID: ad535699805c7edce43f39934716fea42f1cd0cd
  • Gator payload: 9
  • Review mode: initial
  • Previous reviewed SHA: none
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:approval-needed

@pimlock pimlock added the gator:approval-needed Gator completed review; maintainer approval needed label Sep 22, 2026
krishicks
krishicks previously approved these changes Sep 22, 2026
@pimlock pimlock added gator:merge-ready and removed gator:approval-needed Gator completed review; maintainer approval needed labels Sep 22, 2026
@pimlock
pimlock added this pull request to the merge queue Sep 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Sep 22, 2026
@pimlock pimlock added gator:blocked Gator is blocked by process or repository gates and removed gator:merge-ready labels Sep 22, 2026
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>

@pimlock pimlock left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

The follow-up review checked the author-only delta after the rebase, including the revised bounded relay and pipeline-boundary tests, and found no blocking issues. Required Branch Checks and E2E are running on the current head.

Blocking findings:

  • No blocking findings remain

Carried findings:

  • None
Gator metadata
  • Validation: Focused network-relay security fix with a clear threat, bounded implementation, regression coverage, and architecture documentation.
  • Docs: Architecture limits documentation updated; no direct user-facing CLI, API, policy, or workflow change requires Fern docs.
  • Checks: Current-head Branch Checks and E2E are in progress; Helm Lint and Trivy Changes are green.
  • E2E: test:e2e is applied and the current-head workflow is running.
  • Head SHA: 971f27fab32b8c9cb9720294de2655d92b472265
  • Base SHA: e367d47394e84e199908e8d426c71781aa1394ae
  • Merge base SHA: 4b1c09de28eb012a8d83476dddf92c0fc69bd03c
  • Patch ID: b61971d20ffce6e513cc5bdcf6ef9f194eca6368
  • Gator payload: 9
  • Review mode: follow_up
  • Previous reviewed SHA: e03c6ddb0b8638866c98fa3242fe65a9e935d45f
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:watch-pipeline

@pimlock pimlock added gator:watch-pipeline Gator is monitoring PR CI/CD status and removed gator:blocked Gator is blocked by process or repository gates labels Sep 22, 2026
@pimlock
pimlock added this pull request to the merge queue Sep 22, 2026
@pimlock pimlock added gator:merge-ready and removed gator:watch-pipeline Gator is monitoring PR CI/CD status labels Sep 22, 2026
Merged via the queue into main with commit 5a81d2b Sep 22, 2026
106 of 108 checks passed
@pimlock
pimlock deleted the bounded-chunked-relay/pimlock branch September 22, 2026 20:13
@pimlock

pimlock commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

gator-agent

Monitoring Complete

Monitoring is complete because this PR has merged.

Final status: the focused network-relay security fix completed Gator review, required checks passed, and maintainer approval was present before merge.

I removed the active gator:* label because there is nothing left for gator to monitor on this PR.

Gator metadata
  • Head SHA: 971f27fab32b8c9cb9720294de2655d92b472265
  • Gator payload: 9
  • Final state: merged

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

Labels

test:e2e Requires end-to-end coverage topic:security Security issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants