Skip to content

Conversation

@nerddtvg
Copy link
Contributor

Fix Integer Overflow in Header Processing

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

When MaxRequestHeadersTotalSize is set to int.MaxValue, an integer overflow occurs inside Http1Connection forcing connections to fail.

Description

A basic cast from int to long prior to the addition will solve this. I have attempted to include a Unit test, however I am unable to run unit tests to verify if this does in fact work as expected.

Fixes #41756

@ghost ghost added area-runtime community-contribution Indicates that the PR has been added by a community member labels May 19, 2022
@dnfadmin
Copy link

dnfadmin commented May 19, 2022

CLA assistant check
All CLA requirements met.

@Tratcher Tratcher self-assigned this May 19, 2022
@Tratcher
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Tratcher Tratcher enabled auto-merge (squash) May 20, 2022 19:54
@Tratcher Tratcher merged commit 8a4b4de into dotnet:main May 20, 2022
@ghost ghost added this to the 7.0-preview5 milestone May 20, 2022
@Tratcher
Copy link
Member

Thanks

@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integer Overflow Causing HTTP1 Connections to Fail in Kestrel

5 participants