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

crypto/tls: missing ec_point_formats extension make some old clients to decline handshake #31943

Closed
rs opened this issue May 9, 2019 · 6 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rs
Copy link
Contributor

rs commented May 9, 2019

For some reason, Go TLS does send the ec_point_formats extension as part of ClientHello with the minimum required list, but does not for ServerHello.

Per RFC 8422, section 5.1.2, it is perfectly fine not to send this extension, and most clients are fine with it:

For backwards compatibility purposes, the point format list extension MAY still be included and contain exactly one value: the uncompressed point format (0). RFC 4492 specified that if this extension is missing, it means that only the uncompressed point format is supported, so interoperability with implementations that support the uncompressed format should work with or without the extension.

However, some old (7 year old) client implementations are expecting this extension to be present if an ECC cipher is selected, and consider the lack of it to be an error and interrupt the handshake as a result.

Other server implementations like BoringSSL or OpenSSL implement this extension and always send it as part of an ECC ServerHello. There is no need to implement any of the compression format as RFC 8422, section 5.1.2 deprecates them all. Only the uncompressed format MUST be part of the list:

This specification deprecates all but the uncompressed point format. Implementations of this document MUST support the uncompressed format for all of their supported curves and MUST NOT support other formats for curves defined in this specification.

I propose to send this extension with the uncompressed format as part of all ServerHello with an ECC cipher selected.

A patch will follow.

@rs
Copy link
Contributor Author

rs commented May 9, 2019

Cc @FiloSottile

@rs
Copy link
Contributor Author

rs commented May 9, 2019

It is worth noting that on the client side, Go is unconditionally sending ec_point_format and supported_groups extensions, regardless of the ciphersuites containing any ECC capable ciphers. OpenSSL does not send those extension in such case, and the RFC 8422, section 5.1 says:

The extensions SHOULD be sent along with any ClientHello message that proposes ECC cipher suites.

Nothing says we MUST NOT send it in case of non-ECC cipher suites, and this kind of handshake is hopefully going away, but it means that this patch will affect all types of handshake flow tests in place.

I was considering adding a condition for not sending those extensions in case of RSA only handshake, but I guess it would be rejected.

Please advise.

@gopherbot
Copy link

Change https://golang.org/cl/176418 mentions this issue: crypto/tls: send ec_points_format extension in ServerHello

@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 13, 2019
@andybons andybons added this to the Unplanned milestone May 13, 2019
@FiloSottile
Copy link
Contributor

More than happy to match OpenSSL and BoringSSL here. It's kind of hard to get Go to do an ECC-less ClientHello, so I would not bother with figuring that out to remove the extension.

The tree is frozen now, so will merge as soon as 1.14 opens. Thanks for sending a patch!

@FiloSottile FiloSottile added the NeedsFix The path to resolution is known, but the work has not been done. label May 27, 2019
@FiloSottile FiloSottile modified the milestones: Unplanned, Go1.14 May 27, 2019
@FiloSottile FiloSottile self-assigned this May 27, 2019
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 27, 2019
@rs
Copy link
Contributor Author

rs commented Oct 1, 2019

Any news on this?

@FiloSottile
Copy link
Contributor

Was just looking at it yesterday while retriaging for Go 1.14. I'll be rebasing and merging it soon!

@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
@smasher164 smasher164 modified the milestones: Backlog, Go1.14 Oct 11, 2019
@golang golang locked and limited conversation to collaborators Oct 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants