Skip to content

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

Draft
pimlock wants to merge 1 commit into
mainfrom
bounded-chunked-relay/pimlock
Draft

pimlock wants to merge 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)

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@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

pimlock commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test e03c6dd

@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.

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.

1 participant