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

[security] ReadHeaderTimeout not configured #821

Closed
duglin opened this issue Nov 8, 2022 · 0 comments · Fixed by #826
Closed

[security] ReadHeaderTimeout not configured #821

duglin opened this issue Nov 8, 2022 · 0 comments · Fixed by #826

Comments

@duglin
Copy link
Contributor

duglin commented Nov 8, 2022

Description

The http.server API in Go can be initialized with four different timeouts, including ReadHeaderTimeout. Without specifying a value for this timeout, the listener instance will become vulnerable to the Slowloris DoS attack.
image
code

Exploit Scenario

Attackers can exhaust server resources by opening multiple HTTP connections to the server, keeping the connections open, and slowly and continuously sending new HTTP header lines over the socket. This will eventually exhaust all open file handles.

Recommendations

Short term, specify appropriate timeout value for the ReadHeaderTimeout parameter. Long term, improve the code and SDK documentation to consider other means of handling
timeouts and preventing DoS attacks.

This was opened due to the Trail of Bits security review

duglin pushed a commit to duglin/sdk-go that referenced this issue Dec 8, 2022
Closes cloudevents#821

Signed-off-by: Doug Davis <dug@microsoft.com>
duglin pushed a commit to duglin/sdk-go that referenced this issue Dec 8, 2022
Closes cloudevents#821

Signed-off-by: Doug Davis <dug@microsoft.com>
duglin pushed a commit to duglin/sdk-go that referenced this issue Dec 8, 2022
Closes cloudevents#821

Signed-off-by: Doug Davis <dug@microsoft.com>
duglin pushed a commit to duglin/sdk-go that referenced this issue Dec 8, 2022
Closes cloudevents#821

Signed-off-by: Doug Davis <dug@microsoft.com>
duglin pushed a commit to duglin/sdk-go that referenced this issue Dec 8, 2022
Closes cloudevents#821

Signed-off-by: Doug Davis <dug@microsoft.com>
duglin pushed a commit to duglin/sdk-go that referenced this issue Dec 8, 2022
Closes cloudevents#821

Signed-off-by: Doug Davis <dug@microsoft.com>
duglin pushed a commit to duglin/sdk-go that referenced this issue Dec 9, 2022
Closes cloudevents#821

Signed-off-by: Doug Davis <dug@microsoft.com>
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 a pull request may close this issue.

1 participant