Re: [TLS] RFC-4366-bis and the unrecognized_name(112) alert

Marsh Ray <marsh@extendedsubset.com> Wed, 09 June 2010 18:54 UTC

Return-Path: <marsh@extendedsubset.com>
X-Original-To: tls@core3.amsl.com
Delivered-To: tls@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 902803A659A for <tls@core3.amsl.com>; Wed, 9 Jun 2010 11:54:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.139
X-Spam-Level:
X-Spam-Status: No, score=-0.139 tagged_above=-999 required=5 tests=[AWL=0.046, BAYES_40=-0.185]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5gFWRKslnIYU for <tls@core3.amsl.com>; Wed, 9 Jun 2010 11:54:23 -0700 (PDT)
Received: from mho-01-ewr.mailhop.org (mho-01-ewr.mailhop.org [204.13.248.71]) by core3.amsl.com (Postfix) with ESMTP id 968C63A6359 for <tls@ietf.org>; Wed, 9 Jun 2010 11:54:23 -0700 (PDT)
Received: from xs01.extendedsubset.com ([69.164.193.58]) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from <marsh@extendedsubset.com>) id 1OMQPw-0000V2-R3; Wed, 09 Jun 2010 18:54:24 +0000
Received: from [127.0.0.1] (localhost [127.0.0.1]) by xs01.extendedsubset.com (Postfix) with ESMTP id 125BE64D9; Wed, 9 Jun 2010 18:54:23 +0000 (UTC)
X-Mail-Handler: MailHop Outbound by DynDNS
X-Originating-IP: 69.164.193.58
X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1+RVJOeb2QZRkI9o6JslE9eIFCXiPJUdp4=
Message-ID: <4C0FE35D.5090409@extendedsubset.com>
Date: Wed, 09 Jun 2010 13:54:21 -0500
From: Marsh Ray <marsh@extendedsubset.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2
MIME-Version: 1.0
To: mrex@sap.com
References: <201006091813.o59IDvbn000034@fs4113.wdf.sap.corp>
In-Reply-To: <201006091813.o59IDvbn000034@fs4113.wdf.sap.corp>
X-Enigmail-Version: 1.0.1
OpenPGP: id=1E36DBF2
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: paul.hoffman@vpnc.org, tls@ietf.org
Subject: Re: [TLS] RFC-4366-bis and the unrecognized_name(112) alert
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
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/listinfo/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: Wed, 09 Jun 2010 18:54:24 -0000

On 6/9/2010 1:13 PM, Martin Rex wrote:
> 
> And even when DH_anon cipher suites are used, there certainly is a 
> "credential" involved, it just is not associated with any name.

Guess I thought of it as unauthenticated key agreement without use of
credentials.

> Personally, I would be fine with RECOMMENDing that the server should 
> behave as if it did not receive the extension all in the case that it
> does not recognize the server_name.  Doing this improves robustness 
> (principle of least surprises).  But I don't know how others feel 
> about this.

If my web browser asked my ISP-provided DNS resolver for a missing
hostname and instead got some default webserver with advertising pages,
I would be irritated, but not surprised.

If I got a positive response back from DNS, then began handshaking TLS
with that server only find a certificate mismatch with some other
server, I would be surprised.

If I successfully completed a handshake with the wrong server which
presented a wildcard cert that happened to also be valid for the server
I requested, I would be even more surprised.

But hey, that's just me, reasonable people see things differently. :-)

> However, when the server decides to continue the handshake then it 
> wouldn't be very helpful if the client chokes on a warning-level 
> alert unrecognized_name(112) and aborts the handshake.

Keep in mind that this scenario is only likely to occur as a result of
some other screwup (e.g., DNS or server misconfiguration). Unless
there's common usage I'm not aware of the possibililty of any
"successful" outcome from this handshake seems pretty small.

Protocols and sites that do want to deploy some kind of useful "default
TLS server" seem like the kind of case that "RECOMMENDED" and "SHOULD"
already allow for: "valid reasons in particular circumstances to ignore
a particular item, but the full implications must be understood and
carefully weighed before choosing a different course".

> A TLS client implementation that aborts receiving a warning-level
> unrecognized_name(112) alert is defective. It is the duty of the
> client application to determine whether to abort the handshake
> (and/or communication) when the server endpoint identification
> fails.

The application code may in fact be implementing that behavior, or it
may have chosen to delegate that decision to the TLS implementation.

The point of a warning is to inform the endpoint of a potentially
significant situation so that he can make an informed decision about
whether or not to continue.

This sounds a bit self-contradictory to me:
> [...] the client's behavior in response to warning-level alerts is
> unpredictable. If there is a mismatch between the server name used by
> the client application and the server name of the credential chosen
> by the server, this mismatch will become apparent when the client
> application performs the server endpoint identification, at which
> point the client application will have to decide whether to proceed
> with the communication.

On one hand we're saying we can't use a proper warning here because the
client might decide to abort. On the other we're hoping the server
presents the client with a bad cert so he can "decide whether to proceed"?

Note that the early abort in this situation probably avoids a lot of
wasted crypto math and could conceivably prevent an inadvertent DoS.

- Marsh