Re: [TLS] 4366bis TLSext SNI -- case-sensitivity, permitted chars

Martin Rex <mrex@sap.com> Thu, 18 November 2010 19:38 UTC

Return-Path: <mrex@sap.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 97F623A6834 for <tls@core3.amsl.com>; Thu, 18 Nov 2010 11:38:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.126
X-Spam-Level:
X-Spam-Status: No, score=-10.126 tagged_above=-999 required=5 tests=[AWL=0.123, BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-8]
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 5nm0g+48I2PX for <tls@core3.amsl.com>; Thu, 18 Nov 2010 11:37:59 -0800 (PST)
Received: from smtpde02.sap-ag.de (smtpde02.sap-ag.de [155.56.68.140]) by core3.amsl.com (Postfix) with ESMTP id 71E143A688C for <tls@ietf.org>; Thu, 18 Nov 2010 11:37:59 -0800 (PST)
Received: from mail.sap.corp by smtpde02.sap-ag.de (26) with ESMTP id oAIJckVw012265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <tls@ietf.org>; Thu, 18 Nov 2010 20:38:46 +0100 (MET)
From: Martin Rex <mrex@sap.com>
Message-Id: <201011181938.oAIJcj9V013299@fs4113.wdf.sap.corp>
To: mrex@sap.com
Date: Thu, 18 Nov 2010 20:38:45 +0100
In-Reply-To: <201011181915.oAIJFkrh012156@fs4113.wdf.sap.corp> from "Martin Rex" at Nov 18, 10 08:15:46 pm
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Scanner: Virus Scanner virwal08
X-SAP: out
Cc: tls@ietf.org
Subject: Re: [TLS] 4366bis TLSext SNI -- case-sensitivity, permitted chars
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
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/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: Thu, 18 Nov 2010 19:38:00 -0000

Martin Rex wrote:
> 
> 
> 
> Looking at the OpenSSL diffs for CVE-2010-3864 and crosschecking with
> rfc4366 and rfc4366bis I noticed that some text was removed or lost
> from the description of the Server Name Indication extension
> for rfc4366->rfc4366bis.
> 
> 
> The IMHO most important part that was lost is:
> 
>     "MUST compare ... case-insensitively."
> 
> and OpenSSL appears to perform a case-sensitive match (strncmp) only.

To avoid confusions--the comparison that I'm talking about is the
one required by this check (now explicitly spelled out in rfc4366bis):

                                                                      A
   server that implements this extension MUST NOT accept the request to
   resume the session if the server_name extension contains a different
   name. Instead, it proceeds with a full handshake to establish a new
   session. When resuming a session, the server MUST NOT include a
   server_name extension in the server hello.

Case-insensitivity also affects any other comparisons involving the
SNI hostname value, e.g. related to selecting a server credential, 

-Martin