Skip to content

proto: reject stream flow-control frames above limits#2651

Open
GHX5T-SOL wants to merge 1 commit into
quinn-rs:mainfrom
GHX5T-SOL:fix-2650-stream-frame-limits
Open

proto: reject stream flow-control frames above limits#2651
GHX5T-SOL wants to merge 1 commit into
quinn-rs:mainfrom
GHX5T-SOL:fix-2650-stream-frame-limits

Conversation

@GHX5T-SOL
Copy link
Copy Markdown

Fixes #2650.

Summary

  • validate send-side stream IDs before handling STOP_SENDING and MAX_STREAM_DATA
  • return STREAM_LIMIT_ERROR for remote-initiated bidirectional stream IDs above the advertised limit
  • add regression coverage for both frame types

Validation

  • cargo test --locked -p quinn-proto stream_limit passed: 5 passed, 0 failed
  • cargo test --locked -p quinn-proto passed: 273 unit tests and 3 doctests passed
  • cargo fmt --all -- --check passed
  • cargo clippy --locked -p quinn-proto --all-targets -- -D warnings passed
  • cargo test --locked --manifest-path fuzz/Cargo.toml passed
  • RUSTFLAGS='--cfg fuzzing' cargo build --locked --manifest-path fuzz/Cargo.toml --bin streams passed
  • git diff --check passed
  • gitleaks protect --staged --redact --no-banner passed: no leaks found

Note: #2601 also touches remote stream allocation state; this PR is against current main and may need a rebase if #2601 lands first.

);
}
Frame::StopSending(frame::StopSending { id, error_code }) => {
if id.initiator() != self.side.side() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd like for this to be a separate commit.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1

Copy link
Copy Markdown
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

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

Thanks!

);
}
Frame::StopSending(frame::StopSending { id, error_code }) => {
if id.initiator() != self.side.side() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raise a transport error on out-of-bounds STOP_SENDING and MAX_STREAM_DATA

3 participants