Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dangling request when connection is closed without error #11528

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

yawkat
Copy link
Member

@yawkat yawkat commented Jan 22, 2025

When a connection is closed without error, a streaming body would never finish, no response would be written, and thus the request would never be released. This patch changes PipeliningServerHandler so that:

  • a normal closure is treated as an EOF by the streaming inbound handler
  • the outbound handler can properly discard a response written after the PipeliningServerHandler is already being removed

Found by fuzzing.

When a connection is closed without error, a streaming body would never finish, no response would be written, and thus the request would never be released. This patch changes PipeliningServerHandler so that:

- a normal closure is treated as an EOF by the streaming inbound handler
- the outbound handler can properly discard a response written after the PipeliningServerHandler is already being removed

Found by fuzzing.
@yawkat yawkat added the type: bug Something isn't working label Jan 22, 2025
@yawkat yawkat added this to the 4.8.0 milestone Jan 22, 2025
@yawkat yawkat requested a review from graemerocher January 22, 2025 19:43
@yawkat yawkat merged commit cff9539 into 4.8.x Jan 22, 2025
22 checks passed
@yawkat yawkat deleted the dangling-remove branch January 22, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants