Re: [TLS] matching identity, by default
Marsh Ray <marsh@extendedsubset.com> Fri, 04 December 2009 00:32 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 3C5593A6884 for <tls@core3.amsl.com>; Thu, 3 Dec 2009 16:32:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.502
X-Spam-Level:
X-Spam-Status: No, score=-2.502 tagged_above=-999 required=5 tests=[AWL=0.097, BAYES_00=-2.599]
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 BYiExDPmqLe3 for <tls@core3.amsl.com>; Thu, 3 Dec 2009 16:32:22 -0800 (PST)
Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) by core3.amsl.com (Postfix) with ESMTP id 0758A3A684C for <tls@ietf.org>; Thu, 3 Dec 2009 16:32:22 -0800 (PST)
Received: from xs01.extendedsubset.com ([69.164.193.58]) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from <marsh@extendedsubset.com>) id 1NGM5l-000L2I-1Y; Fri, 04 Dec 2009 00:32:13 +0000
Received: from [127.0.0.1] (localhost [127.0.0.1]) by xs01.extendedsubset.com (Postfix) with ESMTP id EB0DB603C; Fri, 4 Dec 2009 00:32:10 +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: U2FsdGVkX193C2BMP+ThAv4N+H/re5TPEKTJXvmWkRc=
Message-ID: <4B185888.2090903@extendedsubset.com>
Date: Thu, 03 Dec 2009 18:32:08 -0600
From: Marsh Ray <marsh@extendedsubset.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: James Manger <james@manger.com.au>
References: <C2329F9D-F5EF-4E8B-9EE8-ED246D7B7287@manger.com.au> <BF782069-544A-4842-B8C8-A9472C9794BB@acm.org> <4B17C2F9.9010802@extendedsubset.com> <A1ECF717-4E06-4654-8B1D-7FDE6C5A2F24@acm.org> <4B18096E.20805@extendedsubset.com> <BFD77C8F-FAB9-4DF6-A94A-72A07F57ADE9@manger.com.au>
In-Reply-To: <BFD77C8F-FAB9-4DF6-A94A-72A07F57ADE9@manger.com.au>
X-Enigmail-Version: 0.96.0
OpenPGP: id=1E36DBF2
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Cc: "tls@ietf.org Working Group" <tls@ietf.org>
Subject: Re: [TLS] matching identity, by default
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: Fri, 04 Dec 2009 00:32:23 -0000
James Manger wrote: > > 1. HttpsURLConnection https = (HttpsURLConnection) > url.openConnection(); 2. serverName = > https.getPeerPrincipal().getName(); 3. in = https.getInputStream(); > in.read()... 4. colour = > isEVCertificate(https.getServerCertificates()[0]) ? green: white; > > Unfortunately this is insecure. Yep. > If a TLS renegotiation completed between steps 2 & 4 then the > serverName may have come from a different certificate than the one > whose Extended Validation status was checked. Yep. > An attacker defeats a weak domain-validation (DV) process to get a > cert for paypal.com; and gets an extended-validation cert for > Attacker Corp. Now the attacker can fool the client's user: initially > negotiating with the DV cert then renegotiating with the EV cert. The > client indicates to its user that paypal.com was strongly identified > -- which is wrong. Or he may even be able to start with an EV cert for "evil.example.com". > This example is a little contrived, but I don't think the > vulnerability in the code would be obvious to even a security-aware > programmer. It is usually how example code is shown, especially for scripting languages. > The fact that calls to getServerCertificates() and > getPeerPrincipal(), or multiple calls to either of these methods, can > return different identity information each time is highly likely to > surprise app developers -- which is a recipe for vulnerabilities. > > TLS libraries ensuring that any authenticated peer identity does not > change across renegotiations -- unless the app has explicitly > indicated it is expecting this -- should be a requirement. It's completely fixed by draft-ietf-tls-renegotiation, no additional constraints on the certs are necessary. > P.S. Java's HttpsURLConnection often uses a default HostnameVerifier > that probably mitigates the specific example above, but not minor > variations. Yep. - Marsh
- Re: [TLS] matching identity, by default Stephen Farrell
- [TLS] matching identity, by default James Manger
- Re: [TLS] matching identity, by default Bodo Moeller
- Re: [TLS] matching identity, by default Marsh Ray
- Re: [TLS] matching identity, by default Bodo Moeller
- Re: [TLS] matching identity, by default Marsh Ray
- Re: [TLS] matching identity, by default Bill Frantz
- Re: [TLS] matching identity, by default Nelson B Bolyard
- Re: [TLS] matching identity, by default James Manger
- Re: [TLS] matching identity, by default David-Sarah Hopwood
- Re: [TLS] matching identity, by default Marsh Ray
- Re: [TLS] matching identity, by default Marsh Ray
- Re: [TLS] matching identity, by default Michael Gray
- Re: [TLS] matching identity, by default Martin Rex
- Re: [TLS] matching identity, by default Martin Rex
- Re: [TLS] matching identity, by default Marsh Ray
- Re: [TLS] matching identity, by default Martin Rex
- Re: [TLS] matching identity, by default Marsh Ray
- Re: [TLS] matching identity, by default James Manger
- Re: [TLS] matching identity, by default Marsh Ray
- Re: [TLS] matching identity, by default Bill Frantz
- Re: [TLS] matching identity, by default Kyle Hamilton
- Re: [TLS] matching identity, by default Kyle Hamilton
- Re: [TLS] matching identity, by default Martin Rex
- Re: [TLS] matching identity, by default Bodo Moeller