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

tls_inspector: Fix invalid ALPN extension in test #34300

Merged
merged 1 commit into from
May 22, 2024

Conversation

tedjpoole
Copy link
Contributor

This commit stops generateClientHelloFromJA3Fingerprint() generating client hellos containing an invalid ALPN extension. It also updates relevant tls_inspector_test functions to check the ALPN value, if expected.

When the generateClientHelloFromJA3Fingerprint() function was asked to include an ALPN extension (16) in the generated client hello, it was generating a default empty extension with the correct id (16) but a zero length. While this is technically a valid extension, it is not a valid ALPN extension, which must include a list of the client's preferred protocol(s).

This was causing test failures in the envoyproxy/envoy-openssl repo because OpenSSL responds to the malformed ALPN extension by sending a TLS alert 50 (Decode Error) which causes many of the tls_inspector_test functions to fail.

Risk Level: Low
Testing: Modifies existing tests
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

This commit stops generateClientHelloFromJA3Fingerprint() generating client
hellos containing an invalid ALPN extension. It also updates relevant
tls_inspector_test functions to check the ALPN value, if expected.

When the generateClientHelloFromJA3Fingerprint() function was asked to include
an ALPN extension (16) in the generated client hello, it was generating a
default empty extension with the correct id (16) but a zero length. While this
is technically a valid extension, it is not a valid ALPN extension, which must
include a list of the client's preferred protocol(s).

This was causing test failures in the envoy-openssl repo because OpenSSL
responds to the malformed ALPN extension by sending a TLS alert 50 (Decode
Error) which causes many of the tls_inspector_test functions to fail.

Signed-off-by: Ted Poole <[email protected]>
@ggreenway ggreenway self-assigned this May 22, 2024
@ggreenway ggreenway merged commit 72362c1 into envoyproxy:main May 22, 2024
51 checks passed
@tedjpoole tedjpoole deleted the fix-invalid-alpn-extension branch May 22, 2024 16:19
tedjpoole added a commit to tedjpoole/envoyproxy-envoy that referenced this pull request May 22, 2024
This commit stops generateClientHelloFromJA3Fingerprint() generating client
hellos containing an invalid ALPN extension. It also updates relevant
tls_inspector_test functions to check the ALPN value, if expected.

When the generateClientHelloFromJA3Fingerprint() function was asked to include
an ALPN extension (16) in the generated client hello, it was generating a
default empty extension with the correct id (16) but a zero length. While this
is technically a valid extension, it is not a valid ALPN extension, which must
include a list of the client's preferred protocol(s).

This was causing test failures in the envoy-openssl repo because OpenSSL
responds to the malformed ALPN extension by sending a TLS alert 50 (Decode
Error) which causes many of the tls_inspector_test functions to fail.

Signed-off-by: Ted Poole <[email protected]>
tedjpoole added a commit to tedjpoole/envoyproxy-envoy that referenced this pull request May 22, 2024
This commit stops generateClientHelloFromJA3Fingerprint() generating client
hellos containing an invalid ALPN extension. It also updates relevant
tls_inspector_test functions to check the ALPN value, if expected.

When the generateClientHelloFromJA3Fingerprint() function was asked to include
an ALPN extension (16) in the generated client hello, it was generating a
default empty extension with the correct id (16) but a zero length. While this
is technically a valid extension, it is not a valid ALPN extension, which must
include a list of the client's preferred protocol(s).

This was causing test failures in the envoy-openssl repo because OpenSSL
responds to the malformed ALPN extension by sending a TLS alert 50 (Decode
Error) which causes many of the tls_inspector_test functions to fail.

Signed-off-by: Ted Poole <[email protected]>
phlax pushed a commit that referenced this pull request May 22, 2024
This commit stops generateClientHelloFromJA3Fingerprint() generating client
hellos containing an invalid ALPN extension. It also updates relevant
tls_inspector_test functions to check the ALPN value, if expected.

When the generateClientHelloFromJA3Fingerprint() function was asked to include
an ALPN extension (16) in the generated client hello, it was generating a
default empty extension with the correct id (16) but a zero length. While this
is technically a valid extension, it is not a valid ALPN extension, which must
include a list of the client's preferred protocol(s).

This was causing test failures in the envoy-openssl repo because OpenSSL
responds to the malformed ALPN extension by sending a TLS alert 50 (Decode
Error) which causes many of the tls_inspector_test functions to fail.

Signed-off-by: Ted Poole <[email protected]>
ggreenway pushed a commit that referenced this pull request May 22, 2024
…4300) (#34302)

tls_inspector: Fix invalid ALPN extension in test (#34300)

This commit stops generateClientHelloFromJA3Fingerprint() generating client
hellos containing an invalid ALPN extension. It also updates relevant
tls_inspector_test functions to check the ALPN value, if expected.

When the generateClientHelloFromJA3Fingerprint() function was asked to include
an ALPN extension (16) in the generated client hello, it was generating a
default empty extension with the correct id (16) but a zero length. While this
is technically a valid extension, it is not a valid ALPN extension, which must
include a list of the client's preferred protocol(s).

This was causing test failures in the envoy-openssl repo because OpenSSL
responds to the malformed ALPN extension by sending a TLS alert 50 (Decode
Error) which causes many of the tls_inspector_test functions to fail.

Signed-off-by: Ted Poole <[email protected]>
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.

2 participants