Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(479)

Issue 157090043: code review 157090043: crypto/tls: support TLS_FALLBACK_SCSV as a server. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by agl1
Modified:
10 years, 6 months ago
Reviewers:
rsc
CC:
rsc, golang-codereviews
Visibility:
Public.

Description

crypto/tls: support TLS_FALLBACK_SCSV as a server. A new attack on CBC padding in SSLv3 was released yesterday[1]. Go only supports SSLv3 as a server, not as a client. An easy fix is to change the default minimum version to TLS 1.0 but that seems a little much this late in the 1.4 process as it may break some things. Thus this patch adds server support for TLS_FALLBACK_SCSV[2] -- a mechanism for solving the fallback problem overall. Chrome has implemented this since February and Google has urged others to do so in light of yesterday's news. With this change, clients can indicate that they are doing a fallback connection and Go servers will be able to correctly reject them. [1] http://googleonlinesecurity.blogspot.com/2014/10/this-poodle-bites-exploiting-ssl-30.html [2] https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00

Patch Set 1 #

Patch Set 2 : diff -r 7d6cfbf209706dca446a55215c6b517194806638 https://code.google.com/p/go #

Patch Set 3 : diff -r 7d6cfbf209706dca446a55215c6b517194806638 https://code.google.com/p/go #

Total comments: 4

Patch Set 4 : diff -r 284a98e61e32b9980118392fd5d4a596b2f49d20 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -2 lines) Patch
M src/crypto/tls/alert.go View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M src/crypto/tls/cipher_suites.go View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/crypto/tls/handshake_server.go View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M src/crypto/tls/handshake_server_test.go View 1 2 3 4 chunks +25 lines, -2 lines 0 comments Download
A src/crypto/tls/testdata/Server-TLSv11-FallbackSCSV View 1 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 3
agl1
Hello rsc@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 6 months ago (2014-10-15 21:12:56 UTC) #1
rsc
LGTM https://codereview.appspot.com/157090043/diff/40001/src/crypto/tls/alert.go File src/crypto/tls/alert.go (right): https://codereview.appspot.com/157090043/diff/40001/src/crypto/tls/alert.go#newcode64 src/crypto/tls/alert.go:64: alertUserCanceled: "user canceled", do you need to add ...
10 years, 6 months ago (2014-10-15 22:56:56 UTC) #2
agl1
10 years, 6 months ago (2014-10-16 00:54:11 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=ad9e191a5194 ***

crypto/tls: support TLS_FALLBACK_SCSV as a server.

A new attack on CBC padding in SSLv3 was released yesterday[1]. Go only
supports SSLv3 as a server, not as a client. An easy fix is to change
the default minimum version to TLS 1.0 but that seems a little much
this late in the 1.4 process as it may break some things.

Thus this patch adds server support for TLS_FALLBACK_SCSV[2] -- a
mechanism for solving the fallback problem overall. Chrome has
implemented this since February and Google has urged others to do so in
light of yesterday's news.

With this change, clients can indicate that they are doing a fallback
connection and Go servers will be able to correctly reject them.

[1]
http://googleonlinesecurity.blogspot.com/2014/10/this-poodle-bites-exploiting...
[2] https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/157090043

https://codereview.appspot.com/157090043/diff/40001/src/crypto/tls/alert.go
File src/crypto/tls/alert.go (right):

https://codereview.appspot.com/157090043/diff/40001/src/crypto/tls/alert.go#n...
src/crypto/tls/alert.go:64: alertUserCanceled:           "user canceled",
On 2014/10/15 22:56:56, rsc wrote:
> do you need to add text for alertInappropriateFallback here?

Done.

https://codereview.appspot.com/157090043/diff/40001/src/crypto/tls/handshake_...
File src/crypto/tls/handshake_server.go (right):

https://codereview.appspot.com/157090043/diff/40001/src/crypto/tls/handshake_...
src/crypto/tls/handshake_server.go:233: return false, errors.New("tls:
connection rejected because the client indicated that it was retrying with a
lesser protocol version when that shouldn't be necessary.")
On 2014/10/15 22:56:56, rsc wrote:
> can you make the error text any shorter?
> 
> "tls: client using inppropriate protocol version fallback"
> ?
> 

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b