Re: [dane] CNAMES and Wildcards

Martin Rex <mrex@sap.com> Thu, 04 August 2011 17:54 UTC

Return-Path: <mrex@sap.com>
X-Original-To: dane@ietfa.amsl.com
Delivered-To: dane@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 47A405E800D for <dane@ietfa.amsl.com>; Thu, 4 Aug 2011 10:54:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.002
X-Spam-Level:
X-Spam-Status: No, score=-9.002 tagged_above=-999 required=5 tests=[AWL=-0.719, BAYES_00=-2.599, HELO_EQ_DE=0.35, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_HI=-8, SARE_URI_EQUALS=1.666]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rwXLfK3ZCCx5 for <dane@ietfa.amsl.com>; Thu, 4 Aug 2011 10:54:21 -0700 (PDT)
Received: from smtpde02.sap-ag.de (smtpde02.sap-ag.de [155.56.68.140]) by ietfa.amsl.com (Postfix) with ESMTP id 4734A5E8002 for <dane@ietf.org>; Thu, 4 Aug 2011 10:54:21 -0700 (PDT)
Received: from mail.sap.corp by smtpde02.sap-ag.de (26) with ESMTP id p74HsXS3029166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Aug 2011 19:54:34 +0200 (MEST)
From: Martin Rex <mrex@sap.com>
Message-Id: <201108041754.p74HsXFd006308@fs4113.wdf.sap.corp>
To: ondrej.sury@nic.cz
Date: Thu, 04 Aug 2011 19:54:33 +0200
In-Reply-To: <85A5D402-0935-4793-97CD-5DC211B360F8@nic.cz> from "Ondřej Surý" at Aug 4, 11 06:05:44 pm
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-SAP: out
Cc: paul.hoffman@vpnc.org, dane@ietf.org
Subject: Re: [dane] CNAMES and Wildcards
X-BeenThere: dane@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: mrex@sap.com
List-Id: DNS-based Authentication of Named Entities <dane.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dane>, <mailto:dane-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dane>
List-Post: <mailto:dane@ietf.org>
List-Help: <mailto:dane-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dane>, <mailto:dane-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Aug 2011 17:54:22 -0000

O. wrote:
> 
> For MX see RFC 3207 Section 4.1:
> 
>    The decision of whether or not to believe the authenticity of the
>    other party in a TLS negotiation is a local matter.  However, some
>    general rules for the decisions are:
> 
>    -  A SMTP client would probably only want to authenticate an SMTP
>       server whose server certificate has a domain name that is the
>       domain name that the client thought it was connecting to.
> 
> It's a bit vague, but I would assume that the SMTP clients connects to
> the domain name of the SMTP server and not to the domain part of the
> email address.

Looking at the info in DNS for "@gmail.com", it appears that google
expects SMTP clients to _not_ perform any kind of matching
... which does not feel right.

gmail.com has the following MX records:

  gmail.com.  3600  IN  MX   5  gmail-smtp-in.l.google.com.
  gmail.com.  3600  IN  MX  10  alt1.gmail-smtp-in.l.google.com.
  gmail.com.  3600  IN  MX  20  alt2.gmail-smtp-in.l.google.com.
  gmail.com.  3600  IN  MX  30  alt3.gmail-smtp-in.l.google.com.
  gmail.com.  3600  IN  MX  40  alt4.gmail-smtp-in.l.google.com.

Talking SMTP & STARTTLS to alt4.gmail-smtp-in.l.google.com. (with TLS SNI)
yields the following TLS Server cert (no subjectAltNames) below:

Subject:  CN=mx.google.com,O=Google Inc,L=Mountain View,S=California,C=US

There would be some security value in tail-matching the target domain
"gmail.com" to the Server certificate, but that is a clear mismatch here.

Tail-matching an MX result with the server certificate looks bogus
to me (without that MX-record being protected by DNSSEC and the result
verified by the SMTP client) and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