Re: [Uta] Comments on draft-ietf-uta-mta-sts-03

Viktor Dukhovni <ietf-dane@dukhovni.org> Tue, 28 February 2017 02:49 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 446311294A5 for <uta@ietfa.amsl.com>; Mon, 27 Feb 2017 18:49:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 2_OZN0TxCMws for <uta@ietfa.amsl.com>; Mon, 27 Feb 2017 18:49:19 -0800 (PST)
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 92CDF129476 for <uta@ietf.org>; Mon, 27 Feb 2017 18:49:19 -0800 (PST)
Received: by mournblade.imrryr.org (Postfix, from userid 1034) id 3C50A7A330D; Tue, 28 Feb 2017 02:49:18 +0000 (UTC)
Date: Tue, 28 Feb 2017 02:49:18 +0000
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
To: uta@ietf.org
Message-ID: <20170228024917.GF7733@mournblade.imrryr.org>
References: <813df83a-841e-4e6a-e3a1-f2852b20ddbc@bluepopcorn.net> <CANtKdUeUrxRzyHeEpq-TdRrEe=_4w4Hvea29OD9k=88mt1KUkg@mail.gmail.com> <2c2520c9-3068-cd07-6c44-861a19fea458@bluepopcorn.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <2c2520c9-3068-cd07-6c44-861a19fea458@bluepopcorn.net>
User-Agent: Mutt/1.7.2 (2016-11-26)
Archived-At: <https://mailarchive.ietf.org/arch/msg/uta/jr-KWtlQQGQdLFQ9P5a2ifZdZfU>
Subject: Re: [Uta] Comments on draft-ietf-uta-mta-sts-03
X-BeenThere: uta@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
Reply-To: uta@ietf.org
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: Tue, 28 Feb 2017 02:49:21 -0000

On Mon, Feb 27, 2017 at 01:46:16PM -0800, Jim Fenton wrote:

> > I don't believe I can speak to this with authority, but I feel
> > somewhat comfortable excluding an /ever-present/ active MITM from our
> > threat model. It's certainly trivial to defeat initial policy
> > discovery, but an attacker must do this all the time. It's feasible,
> > but there's some probability of discovery, of course.
> 
> It's not that the attack has to be ever-present, it's that client MTAs
> that don't have a cached policy for the recipient domain will be showing
> up all the time, and will need to retrieve the policy. To the extent
> that they don't get the TXT record on the first try, they will infer
> that there is no policy, and will continue to do so while the negative
> response is cached by their responder (minimum TTL, typically only a few
> minutes, but the SOA in the NXDOMAIN response could also be spoofed to
> make this much longer). This waters down the effectiveness of MTA STS.

This is a fundamental limitation of STS.  STS cannot protect first
contact.  There is no reasonable way to design around this.  If
you want downgrade resistance, deploy DANE.

> > The "mx" constraint isn't really about the hostnames (though of course
> > it is applied to them); it's about the subject of the server
> > certificates presented by the MX. A different (albeit, I think,
> > needlessly confusing!) design could allow for the MX hostnames to be
> > arbitrary and not match the "mx" constraint in any way; all that
> > matters is the certificate name, for exactly the reason you give.
> 
> Fair enough -- the certificate name addresses the A/AAAA issue.

Indeed constraining the names in the certificate is exactly how
mandatory TLS policy works in Postfix.  We don't filter the MX
hostnames, rather the destination policy can filter the acceptable
certificate names regardless of the MX hostname.

    http://www.postfix.org/postconf.5.html#smtp_tls_secure_cert_match

Filtering the MX hostnames is an indirect way of solving the same
underlying problem.  Perhaps "mx" should be renamed to "san" and
MX host selection then completely decouples from the security
policy.  When the connection is to a host whose certificate is not
suitable, the client hangs up and tries another MX host (up to
whatever limits on the number of such attempts are applicable).

Since this simplifies the protocol, and reduces the code changes
needed in MTAs, it is worth considering.

> > As you probably remember, we did try to have an "either/or" kind of
> > arrangement in the initial draft. It was a lot of extra complexity, I
> > think, for little gain--MTA-STS with DANE certificate validation is
> > sort of pointless, since DANE implies DNSSEC, which implies MX records
> > are themselves signed.
> 
> So what takes precedence: if there is a DANE policy, is MTA-STS ignored?

A sane client that supports DANE should prefer DANE when TLSA
records are published by the destination.  This is based on the
stronger downgrade resistance of DANE and no requirement for
long-term local storage.  Policy lookups have costs, and once a
DANE policy is found, it is simplest to not even bother looking
for STS policy.

Clients that want to eke out as much security as possible might
support both, and use DANE when possible and otherwise STS when
possible.

> >     "When a message fails to deliver...": How does the check for the
> >     updated policy occur, by looking for an updated TXT record or by
> >     re-retrieving the HTTPS policy?
> >
> > By looking for an updated TXT record, as per section 3--but your
> > question suggests we should clarify this. ;)
> 
> Yes, but Viktor's observation on the other thread (that TXT record
> lookups are cheap) applies here so maybe just start all the flows with a
> TXT record lookup.

I am sticking with that position.

-- 
	Viktor.