-
Notifications
You must be signed in to change notification settings - Fork 45
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
Denial of service when the server sends an infinitely large header #55
Comments
This also works when sending a great many smaller headers. |
Wrong issue tracker, or typo in crate name? |
Typo. Let me fix it. Sorry! |
Fixed now. This is what happens when I test 9 clients for 3 DoS issues each at the end of a long day. |
I appreciate the effort you put into these! It's a shame I don't have the time to fix them at the same pace 😄 |
Fixed in efbaf75, though it's opt-in until 3.0.0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
minreq will use an unbounded amount of memory if the server sends a single infinitely large header. This can be used to exhaust the memory on the machine and cause a denial of service.
You can reproduce the issue by running the following in Linux console and then connecting to
localhost:8080
with minreq:( echo -e "HTTP/1.1 200 OK\r"; echo -n "Huge-header: "; yes A | tr -d '\n' ) | nc -l localhost 8080
Tested using this code for minreq. You can inspect the Cargo.lock to know the exact dependency versions.
The text was updated successfully, but these errors were encountered: