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

x/net/http2: Expose isBadCipher #30407

Open
jefferai opened this issue Feb 26, 2019 · 3 comments
Open

x/net/http2: Expose isBadCipher #30407

jefferai opened this issue Feb 26, 2019 · 3 comments
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@jefferai
Copy link

jefferai commented Feb 26, 2019

$ go 1.11.5

When manually specifying server ciphers, it is possible to specify a set of valid TLS 1.2 ciphers that are blacklisted in the HTTP/2 spec. This is a known potential issue; from the spec section 9.2.2:

The black list includes the cipher suite that TLS 1.2 makes mandatory, which means that TLS 1.2 deployments could have non-intersecting sets of permitted cipher suites. To avoid this problem causing TLS handshake failures, deployments of HTTP/2 that use TLS 1.2 MUST support TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 [TLS-ECDHE] with the P-256 elliptic curve [FIPS186].

Although this is in theory enough to prevent handshake failures, highly security conscious/paranoid users may not want to (or be allowed to) use RSA and want further control over exactly which ciphers are in use.

There is an isBadCipher function in the package that in theory could be used to check whether a user's submitted set of ciphers will cause blacklisting issues when using HTTP/2, however since it's not exported client code cannot use it to perform a simple check when evaluating a client's chosen cipher suites.

This is a simple request to expose that function. There is no obvious reason why the behavior of that function should ever change outside of a spec revamp, so it seems fairly safe to do so.

@bcmills
Copy link
Contributor

bcmills commented Feb 27, 2019

CC @bradfitz @tombergan @FiloSottile

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. FeatureRequest labels Feb 27, 2019
@bcmills bcmills added this to the Unreleased milestone Feb 27, 2019
@FiloSottile
Copy link
Contributor

What's the intended use case for this? Checking if user-configured ciphers are ok to use with HTTP/2? Would a "HTTP2BadCipher" field in the CipherSuite struct in #30325 (comment) work?

@bradfitz
Copy link
Contributor

@FiloSottile, putting HTTP/2-specific details in a non-http2 package sounds gross.

I'm fine exporting a func in x/net/http2. It's already full of http2-specific gunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants