-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/tls: ECH decodeInnerClientHello incorrectly rejects ClientHello with GREASE values in supportedVersions #71642
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
Comments
Ensure ECH processing allows multiple versions while enforcing TLS 1.3+ requirement
|
Ah, right, GREASE. Checking for |
Thanks for the feedback! |
Change https://go.dev/cl/648015 mentions this issue: |
@gopherbot please backport to go 1.24 |
Backport issue(s) opened: #73118 (for 1.24). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/661936 mentions this issue: |
Problem Description
In Golang's crypto/tls implementation, the function decodeInnerClientHello contains the following code:
This logic requires supportedVersions to contain exactly one version, which must be TLS 1.3, otherwise, the connection is rejected.
However, Chrome and Edge use the GREASE mechanism, which means supportedVersions may contain multiple values, such as:
supported_versions: [GREASE, TLS 1.3]
Since len(inner.supportedVersions) != 1, Golang incorrectly rejects these connections, causing Chrome and Edge to fail when accessing a Golang Web server with ECH enabled, while Firefox works fine.
Steps to Reproduce
Start a Golang crypto/tls server with ECH enabled.
Try accessing the server using Chrome or Edge.
The connection fails with a TLS error in Chrome.
Try accessing the server using Firefox.
The connection works fine.
Expected Behavior
The server should accept connections as long as supportedVersions contains TLS 1.3, rather than rejecting them due to the GREASE mechanism.
Suggested Fix
Modify decodeInnerClientHello logic to:
Ignore GREASE values (i.e., values with the format 0xXAXA).
Allow multiple versions in supportedVersions, as long as TLS 1.3 is included.
Proposed Code Change
This ensures compatibility with Chrome and Edge while maintaining ECH security.
Related Fix Proposal
🔗 Gerrit CL: https://go-review.googlesource.com/c/go/+/648015
The text was updated successfully, but these errors were encountered: