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

huffman decoder does not work as expected with TCP segmentation 1 byte #1871

Closed
RomanBelozerov opened this issue Apr 21, 2023 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@RomanBelozerov
Copy link
Contributor

RomanBelozerov commented Apr 21, 2023

Scope

1 case:
Send h2 request with TCP segmentation 1 byte and header from: testuser@example.com. Header value contain "@",

AR: Tempesta forwarded request with header from: testuserj.I7iB0nWaN
ER: Tempesta forwarded request with header from: testuser@example.com

2 case:
For frang config:

frang_limits {
    http_host_required true;
}

Send h2 request with TCP segmentation 1 byte and header host: [20:11:abb::1]:443
AR: Tempesta returns 400 response and dmesg warning

[ 5097.963690] [tempesta fw] Warning: HTTP/2 request dropped: state=Req_HdrHostV input=0x71('qc1611:abb::1x64'), len=18, off=0
[ 5097.965653] [tempesta fw] Warning: failed to parse request: 127.0.0.1

ER: Tempesta returns 403 response

3 case:
Send h2 request with TCP segmentation 1 byte and header accept: */*:
AR: Tempesta returns 400 response and dmesg warning

[ 6228.625399] [tempesta fw] Warning: HTTP/2 request dropped: state=Req_HdrAcceptV input=0x4a('JbY'), len=3, off=0
[ 6228.627713] [tempesta fw] Warning: failed to parse request: 127.0.0.1

ER: Tempesta forwards request to server.

Testing

  • t_http_rules.test_h2_http_rules.HttpRulesH2.test_scheduler with -T 1 option or;
  • run any h2 tests with TCP segmentation 1 byte and request header with "@" (For example - from: testuser@example.com) or;
  • t_frang.test_host_required.FrangHostRequiredH2TestCase.test_h2_host_header_as_ipv6 and test_h2_authority_header_as_ipv6 with -T 1 option or;
  • sessions.test_js_challenge.JSChallengeH2.test_get_challenge with -T 1 option.
@RomanBelozerov RomanBelozerov changed the title hpack decoder does not work as expected with TCP segmentation 1 byte and @ in header value huffman decoder does not work as expected with TCP segmentation 1 byte Apr 21, 2023
@krizhanovsky krizhanovsky added this to the 0.7 - HTTP/2 milestone Apr 21, 2023
@EvgeniiMekhanik
Copy link
Contributor

Closed by PR #1874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants