-
Notifications
You must be signed in to change notification settings - Fork 103
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
Chunked Transfer Coding - chunk-size decoding issue #768
Comments
@milabs thank you for the report! |
aleksostapenko
added a commit
that referenced
this issue
Aug 19, 2017
aleksostapenko
added a commit
that referenced
this issue
Aug 22, 2017
Fix #768: Set limit for digits count in 'chunk-size' field of chunked request.
The
Issue #498 (HTTP message buffering and streaming) requires streaming HTTP processing. Meantime, having too large chunks (as well as too large message bodies) we can fail by OOM. To mitigate the problem one can use |
aleksostapenko
added a commit
that referenced
this issue
Aug 23, 2017
aleksostapenko
added a commit
that referenced
this issue
Aug 25, 2017
Fix #768: 1. Replace 'int' with 'long' for chunks size. 2. Add check for 'signed long' overflow.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As per RFC 7230 (4.1):
Tempesta uses parse_int_hex to decode the length. But that function doesn't track the length of the size field itself. So, it's possible to use any amount of leading zeroes ('0') and although it's allowed by RFC this can be used to cause kind of DOS attack:
The script to check the issue:
The text was updated successfully, but these errors were encountered: