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

Martin Rex <mrex@sap.com> Thu, 18 November 2010 19:15 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 46A383A68C6 for <tls@core3.amsl.com>; Thu, 18 Nov 2010 11:15:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.123
X-Spam-Level:
X-Spam-Status: No, score=-10.123 tagged_above=-999 required=5 tests=[AWL=0.126, 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 GepL7UREEEhc for <tls@core3.amsl.com>; Thu, 18 Nov 2010 11:15:01 -0800 (PST)
Received: from smtpde01.sap-ag.de (smtpde01.sap-ag.de [155.56.68.170]) by core3.amsl.com (Postfix) with ESMTP id 938243A68C7 for <tls@ietf.org>; Thu, 18 Nov 2010 11:15:00 -0800 (PST)
Received: from mail.sap.corp by smtpde01.sap-ag.de (26) with ESMTP id oAIJFlJU013544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <tls@ietf.org>; Thu, 18 Nov 2010 20:15:47 +0100 (MET)
From: Martin Rex <mrex@sap.com>
Message-Id: <201011181915.oAIJFkrh012156@fs4113.wdf.sap.corp>
To: tls@ietf.org
Date: Thu, 18 Nov 2010 20:15:46 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Scanner: Virus Scanner virwal08
X-SAP: out
Subject: [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:15:02 -0000

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.


A fairly superficial "grep" TLS Email archives didn't highlight any
discussion that led to the dismissal of that text, but I might well
be overlooking messages.

Original Text text is:
https://tools.ietf.org/html/rfc4366#page-10

   "HostName" contains the fully qualified DNS hostname of the server,
   as understood by the client.  The hostname is represented as a byte
   string using UTF-8 encoding [UTF8], without a trailing dot.

   If the hostname labels contain only US-ASCII characters, then the
   client MUST ensure that labels are separated only by the byte 0x2E,
   representing the dot character U+002E (requirement 1 in Section 3.1
   of [IDNA] notwithstanding).  If the server needs to match the
   HostName against names that contain non-US-ASCII characters, it MUST
   perform the conversion operation described in Section 4 of [IDNA],
   treating the HostName as a "query string" (i.e., the AllowUnassigned
   flag MUST be set).  Note that IDNA allows labels to be separated by
   any of the Unicode characters U+002E, U+3002, U+FF0E, and U+FF61;
   therefore, servers MUST accept any of these characters as a label
   separator.  If the server only needs to match the HostName against
   names containing exclusively ASCII characters, it MUST compare ASCII
   names case-insensitively.

   Literal IPv4 and IPv6 addresses are not permitted in "HostName".

New text is:
https://tools.ietf.org/html/draft-ietf-tls-rfc4366-bis-12#page-8

  "HostName" contains the fully qualified DNS hostname of the server,
   as understood by the client. The hostname is represented as a byte
   string using ASCII encoding without a trailing dot. This allows the
   support of internationalized domain names through the use of A-labels
   defined in [RFC5890].

   Literal IPv4 and IPv6 addresses are not permitted in "HostName".


-Martin