Re: [TLS] Protocol version for inappropriate_fallback alerts (was: Re: I-D Action: draft-ietf-tls-downgrade-scsv-01.txt)

mrex@sap.com (Martin Rex) Thu, 13 November 2014 23:20 UTC

Return-Path: <mrex@sap.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5AC2C1AE257 for <tls@ietfa.amsl.com>; Thu, 13 Nov 2014 15:20:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.551
X-Spam-Level:
X-Spam-Status: No, score=-6.551 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KnjtvizKhtTH for <tls@ietfa.amsl.com>; Thu, 13 Nov 2014 15:20:07 -0800 (PST)
Received: from smtpde02.smtp.sap-ag.de (smtpde02.smtp.sap-ag.de [155.56.68.140]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5EDBD1AE2B2 for <tls@ietf.org>; Thu, 13 Nov 2014 15:19:56 -0800 (PST)
Received: from mail05.wdf.sap.corp (mail05.sap.corp [194.39.131.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtpde02.smtp.sap-ag.de (Postfix) with ESMTPS id D6EE33A2F7; Fri, 14 Nov 2014 00:19:54 +0100 (CET)
Received: from ld9781.wdf.sap.corp (ld9781.wdf.sap.corp [10.21.82.193]) by mail05.wdf.sap.corp (Postfix) with ESMTP id CE508429CB; Fri, 14 Nov 2014 00:19:54 +0100 (CET)
Received: by ld9781.wdf.sap.corp (Postfix, from userid 10159) id C65861AFCC; Fri, 14 Nov 2014 00:19:54 +0100 (CET)
In-Reply-To: <CADMpkcJyojb_=g3uinQX+YTN0tdYD6jivOwgoB_OGqB-6i4B1g@mail.gmail.com>
To: Bodo Moeller <bmoeller@acm.org>
Date: Fri, 14 Nov 2014 00:19:54 +0100
X-Mailer: ELM [version 2.4ME+ PL125 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20141113231954.C65861AFCC@ld9781.wdf.sap.corp>
From: mrex@sap.com
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/rTCHpJ50mKC-4oVskW_0nabh1uQ
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Protocol version for inappropriate_fallback alerts (was: Re: I-D Action: draft-ietf-tls-downgrade-scsv-01.txt)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: mrex@sap.com
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Nov 2014 23:20:16 -0000

Bodo Moeller wrote:
> Martin Rex <mrex@sap.com>:
> 
> I believe you should get rid of the MUST.
>>
>> -     [...]  The
>> -     record layer version number for this alert MUST be set to either
>> -      ClientHello.client_version (as it would for the Server Hello
>> -      message if the server was continuing the handshake), or to the
>> -      record layer version number used by the client.
>> +     [...]  There
>> +     has not been a protocol version negotiated at this point of the
>> +     TLS handshake, so the inappropriate_fallback alert, like any
>> +     other fatal alert this early during the handshake, should use
>> +     a record layer protocol_version that the client can reasonably
>> +     be expected to understand, such as the record layer protocol_version
>> +     that carried the client's ClientHello handshake message or the
>> +     ClientHello.client_version.
> 
> Hm. What else would the client "reasonably be expected to understand"? Your
> proposed wording sounds very vague.

It is vague on purpose, because it is supposed to be non-normative.
Why would you want to inconvenience existing implementations
(where the record level protocol version for an alert might get determined
at the record protocol layer, and _not_ in function (as function parameter)
that triggers the alert response, such as:

   ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_INAPPROPRIATE_FALLBACK);


> 
> I have a serious problem with the text in the parentheses in your current
> > version (from above, re-flowed):
> >
> > -     (unless it responds with a fatal protocol_version alert because the
> > -      version indicated in ClientHello.client_version is unsupported).
> >
> > This text (a) is ignorant about how the SSL&TLS version negotiation is
> > supposed to work and (b) gives a blessing to version-intolerant servers.
> >
> 
> Well, actually I ended up with that text because I copied from the TLS RFCs
> -- see the definition of the protocol_version alert:
> 
> "The protocol version the client has attempted to negotiate is recognized,
> but not supported. (For example, old protocol versions might be avoided for
> security reasons). This message is always fatal."


Which looks very much like an bug in the TLS RFCs.
No, we don't need to be bug-for-bug compatible.


> 
> 
> The above wording is *not* meant to encourage servers to send a
> protocol_version alert if client_version is too high (new), which I think
> is what you got from it.


Non-obvious intentions of the author do not matter here.
The wording clearly suggests that it would be OK for servers for too high
as well.

Consider the following scenario:

 - server that has TLSv1.0 and SSLv3 disabled (Win2012 ADFS?)
 - middlebox in the path that kills TLSv1.2 connections
 - Client that starts with record.pv={3,3}+ClientHello.client_version={3,3}
   observes a connection closure (caused by the middlebox) and
   retries with  record.pv={3,1}+ClientHello.client_version={3,1}+FB_SCSV
   (MSIE 8 on Win7 with TLSv1.0+TLSv1.1+TLSv1.2 enabled)

I can see three possible server responses, and which one do you think
would be best in helping the client to decide how to continue (and why):

 (1) server sees the FB_SCSV and responds with fatal invalid_fallback alert
 (2) server sees ClientHello.client_version={3,1} and responds with
     fatal protocol_version alert
 (3) server continues handshake with ServerHello.server_version={3,2}


-Martin