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

[balsa] Disallow extended ASCII in header names. #27738

Merged
merged 4 commits into from
Jun 6, 2023
Merged

[balsa] Disallow extended ASCII in header names. #27738

merged 4 commits into from
Jun 6, 2023

Conversation

bencebeky
Copy link
Contributor

This is for parity with http-parser. Note that BalsaParser already disallows control characters, space, and certain separator characters [1, 2], but not characters above 127.

[1]
https://github.com/google/quiche/blob/ef9e527e14440794cc18813ef079ebdb3650f8ad/quiche/balsa/header_properties.h#L21-L30 [2]
https://github.com/google/quiche/blob/ef9e527e14440794cc18813ef079ebdb3650f8ad/quiche/balsa/balsa_frame.cc#L414

Tracking issue: #21245
Commit Message: [balsa] Disallow extended ASCII in header names.
Additional Description:
Risk Level: low
Testing: //test/common/http/http1:codec_impl_test
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a
Runtime guard: protected by existing envoy.reloadable_features.http1_use_balsa_parser

This is for parity with http-parser. Note that BalsaParser already
disallows control characters, space, and certain separator characters
[1, 2], but not characters above 127.

[1]
https://github.com/google/quiche/blob/ef9e527e14440794cc18813ef079ebdb3650f8ad/quiche/balsa/header_properties.h#L21-L30
[2]
https://github.com/google/quiche/blob/ef9e527e14440794cc18813ef079ebdb3650f8ad/quiche/balsa/balsa_frame.cc#L414

Signed-off-by: Bence Béky <bnc@google.com>
@bencebeky bencebeky marked this pull request as draft May 31, 2023 18:58
Signed-off-by: Bence Béky <bnc@google.com>
@bencebeky
Copy link
Contributor Author

/retest

@yanavlasov yanavlasov self-assigned this Jun 1, 2023
Signed-off-by: Bence Béky <bnc@google.com>
Copy link
Contributor

@yanavlasov yanavlasov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/wait

source/common/http/http1/balsa_parser.cc Outdated Show resolved Hide resolved
Signed-off-by: Bence Béky <bnc@google.com>
@bencebeky bencebeky marked this pull request as ready for review June 5, 2023 19:52
@yanavlasov yanavlasov enabled auto-merge (squash) June 6, 2023 14:04
@yanavlasov yanavlasov merged commit 1c25c51 into envoyproxy:main Jun 6, 2023
@bencebeky bencebeky deleted the ascii branch June 20, 2023 19:46
asheryerm pushed a commit to asheryerm/envoy that referenced this pull request Jul 5, 2023
* [balsa] Disallow extended ASCII in header names.

This is for parity with http-parser. Note that BalsaParser already
disallows control characters, space, and certain separator characters
[1, 2], but not characters above 127.

[1]
https://github.com/google/quiche/blob/ef9e527e14440794cc18813ef079ebdb3650f8ad/quiche/balsa/header_properties.h#L21-L30
[2]
https://github.com/google/quiche/blob/ef9e527e14440794cc18813ef079ebdb3650f8ad/quiche/balsa/balsa_frame.cc#L414

Signed-off-by: Bence Béky <bnc@google.com>
Signed-off-by: asheryer <asheryer@amazon.com>
reskin89 pushed a commit to reskin89/envoy that referenced this pull request Jul 11, 2023
* [balsa] Disallow extended ASCII in header names.

This is for parity with http-parser. Note that BalsaParser already
disallows control characters, space, and certain separator characters
[1, 2], but not characters above 127.

[1]
https://github.com/google/quiche/blob/ef9e527e14440794cc18813ef079ebdb3650f8ad/quiche/balsa/header_properties.h#L21-L30
[2]
https://github.com/google/quiche/blob/ef9e527e14440794cc18813ef079ebdb3650f8ad/quiche/balsa/balsa_frame.cc#L414

Signed-off-by: Bence Béky <bnc@google.com>
Signed-off-by: Ryan Eskin <ryan.eskin89@protonmail.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 this pull request may close these issues.

3 participants