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

net/http: logic error in http2ConfigureServer? #28929

Open
pxing-china opened this Issue Nov 23, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@pxing-china

pxing-china commented Nov 23, 2018

Reported against tip, 649b893

} else if sawBad {

the logic of this line is error(ValidCipher, BadCipher,BadCipher will go through), it should be

if http2isBadCipher(cs) {
    sawBad = true
} 
if sawBad {
    return fmt.Errorf("http2: TLSConfig.CipherSuites index %d contains an HTTP/2-approved cipher suite (%#04x), but it comes after unapproved cipher suites. With this configuration, clients that don't support previous, approved cipher suites may be given an unapproved one and reject the connection.", i, cs)
}

@myitcv myitcv changed the title from The sawBad logic is error to net/http: logic error in http2ConfigureServer? Nov 23, 2018

@myitcv

This comment has been minimized.

Member

myitcv commented Nov 23, 2018

@fraenkel

This comment has been minimized.

Contributor

fraenkel commented Nov 24, 2018

@pxing-china I think you misunderstood the check.
It wants to prevent BadCipher, ValidCipher. Given this order, the bad cipher will cause the connection to be rejected before trying the valid cipher. BadCiphers after ValidCiphers are fine because at least you tried all the valid ones first.

@andybons andybons added this to the Unplanned milestone Nov 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment