Re: [Uta] Eric Rescorla's Discuss on draft-ietf-uta-mta-sts-17: (with DISCUSS and COMMENT)

Viktor Dukhovni <ietf-dane@dukhovni.org> Fri, 04 May 2018 14:42 UTC

Return-Path: <ietf-dane@dukhovni.org>
X-Original-To: uta@ietfa.amsl.com
Delivered-To: uta@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3332B12DA14; Fri, 4 May 2018 07:42:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.201
X-Spam-Level:
X-Spam-Status: No, score=-4.201 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9461Ynts6FKe; Fri, 4 May 2018 07:42:15 -0700 (PDT)
Received: from mournblade.imrryr.org (mournblade.imrryr.org [108.5.242.66]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3120A12E03E; Fri, 4 May 2018 07:42:14 -0700 (PDT)
Received: from [100.70.184.123] (unknown [209.48.7.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mournblade.imrryr.org (Postfix) with ESMTPSA id 5EDED7A3309; Fri, 4 May 2018 14:42:13 +0000 (UTC) (envelope-from ietf-dane@dukhovni.org)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\))
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
In-Reply-To: <CABcZeBORH1iKZ2QZb_DBcwsDdBDS8Nbxb_A6Q7RxNL6X6Xg_BQ@mail.gmail.com>
Date: Fri, 04 May 2018 10:41:13 -0400
Cc: uta@ietf.org, draft-ietf-uta-mta-sts@ietf.org, uta-chairs@ietf.org, The IESG <iesg@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <7A6E57A9-E7B5-4326-B4B5-7777DFCF8C44@dukhovni.org>
References: <152539648489.11713.7895583526344282774.idtracker@ietfa.amsl.com> <20180504051945.GS3322@mournblade.imrryr.org> <CABcZeBORH1iKZ2QZb_DBcwsDdBDS8Nbxb_A6Q7RxNL6X6Xg_BQ@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
X-Mailer: Apple Mail (2.3445.6.18)
Archived-At: <https://mailarchive.ietf.org/arch/msg/uta/ToYDeyQwK8da8-YkTdIpgOEQyIY>
Subject: Re: [Uta] Eric Rescorla's Discuss on draft-ietf-uta-mta-sts-17: (with DISCUSS and COMMENT)
X-BeenThere: uta@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: UTA working group mailing list <uta.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/uta>, <mailto:uta-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/uta/>
List-Post: <mailto:uta@ietf.org>
List-Help: <mailto:uta-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/uta>, <mailto:uta-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 04 May 2018 14:42:18 -0000

[ Re-ordered for clarity.  Hope the below adds some context. ]

> On May 4, 2018, at 8:11 AM, Eric Rescorla <ekr@rtfm.com> wrote:
> 
> Preemptive removal of non-matching MX hosts is liable (in sloppy
> implementations, and I expect enough to be sloppy) to cause routing
> loops, when a backup MX host, not after removing itself early from
> the list, fails to eliminate worse priority MX hosts. 
> 
> I don't understand this claim. 

A sending MTA might be a non-primary MX host for a domain, that
is trying to reach a better (lower) preference MX host.  If it
prunes the MX RRset based on the STS policy, *before* dropping
all worse (higher) preference MX hosts, it is liable to create
a mail routing loop, by not taking into account the fact it is
one of the MX hosts for the destination.  Ideally the domain's
MX RRset should not contain any names not matched by the STS
policy, but reality is sometimes different.

If the meaning of the matching field were changed to be an
MX hostname pattern, rather than a presented-identifet (RFC6125)
pattern, then we'd need rather prominent warnings in the
text about routing loop avoidance.

>> So trying to make sure that you're reaching the MX host
>> you think you're reaching and not one of the others is
>> largely pointless and often a lost cause.
> 
> But not everyone is configured this way.

Yes, some domains have distinct per-MX certificates.  Even then,
an MiTM attacker can still restrict traffic to any MX host of
his/her choice, but if the name matching were more strict indeed
the sending MTA would then know *which* MX host this was more
reliably than otherwise.

>> See above.  If the MX host has a certificate that matches the
>> client's SNI, it'll may return it, even if that's one of the other
>> MX hosts.  If it does not return a matching certificate, the "attack"
>> fails.
> 
> This might be true, but this kind of informal reasoning is notoriously
> prone to error.  We have a general pattern for TLS certificate verification,
> which you are deviating from, and we then need to analyze in detail. I'm
> not seeing any good reason for that.

Historically, because MX lookups are unauthenticated DNS, trusting
the MX hostname was not a good option.  So SMTP senders would validate
the next-hop domain, rather than the MX hostname.  Correspondingly,
the certificates used by MX hosts would not necessarily match the
MX hostname, some matched only the (email) destination domain.
These were called UCC certificates by some.

Of course MTA-STS is new territory, and one might require suitable
new certificates for that, that always match the MX hostname.  The
current draft is more forgiving.
> 
>> It also
>> requires all sites to duplicate MX host updates from DNS into the
>> STS policy, disallowing the "low-maintenance" ".example.com" form.
> 
> I don't see why this would be true. You publish .example.com and
> then you modify the MX requires at will. provided that they all end
> in .example.com.

Yes, that's true, provided the field remains a pattern.  It would
invite the routing loop mis-optimization, not clear how effective
the text can be in the face of lazy implementors who just read some
TL;DR summary and implement without much thought.  The presented-
identifier design is less prone to getting that wrong...

>> In short, I have not implemented and don't expect to implement CRL
>> support in Postfix.
>> 
> You seem to be omitting the obvious answer: regular OCSP.

I did mention OCSP, I have problems with it:

 * When OCSP lookups temp-fail, my impression is that most
   clients generally continue processing.  This obviates
   the security benefits of OCSP.  Otherwise the CA OCSP
   server becomes a single point of failure I'd prefer
   to avoid.

 * One of goals of DANE and MTA-STS is to increase email
   transport privacy.  Leaking the (sender-domain, 
   recipient-domain) pairs to a new third party is in
   conflict with that goal.

Hope that helps.

-- 
	Viktor.