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

net/http: server may open an unlimited number of file descriptors without program control #60765

Open
andrewhodel opened this issue Jun 13, 2023 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@andrewhodel
Copy link

https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/net/http/server.go;l=2451

The processing code writes a response to the http socket before exposing the request and path to a closure available by the http module.

This allows anyone to open an extreme number of file descriptors on a linux system and other operating systems that use that construct (tcp stack) for handling timeouts without being able to log it.

@andrewhodel andrewhodel changed the title affected/package: net/http allows file descriptors to be created by http server without code affected/package: net/http allows file descriptors to be created by http server and no closure Jun 13, 2023
@andrewhodel
Copy link
Author

This locks the http server often.

@ianlancetaylor ianlancetaylor changed the title affected/package: net/http allows file descriptors to be created by http server and no closure net/http: server may open an unlimited number of file descriptors without program control Jun 13, 2023
@ianlancetaylor
Copy link
Contributor

CC @neild

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 13, 2023
@seankhliao seankhliao added this to the Unplanned milestone Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants