Re: [ietf-smtp] MTS-STS validation when MX host points to a CNAME, violating RFC 2181 § 10.3

Viktor Dukhovni <ietf-dane@dukhovni.org> Fri, 02 April 2021 23:13 UTC

Return-Path: <ietf-dane@dukhovni.org>
X-Original-To: ietf-smtp@ietfa.amsl.com
Delivered-To: ietf-smtp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2088E3A0C59 for <ietf-smtp@ietfa.amsl.com>; Fri, 2 Apr 2021 16:13:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 EmPY5BHLtHcm for <ietf-smtp@ietfa.amsl.com>; Fri, 2 Apr 2021 16:13:44 -0700 (PDT)
Received: from straasha.imrryr.org (straasha.imrryr.org [100.2.39.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C7AEF3A0C58 for <ietf-smtp@ietf.org>; Fri, 2 Apr 2021 16:13:44 -0700 (PDT)
Received: by straasha.imrryr.org (Postfix, from userid 1001) id 8E8E6DBABE; Fri, 2 Apr 2021 19:13:42 -0400 (EDT)
Date: Fri, 2 Apr 2021 19:13:42 -0400
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
To: ietf-smtp@ietf.org
Message-ID: <YGelJml2wHttFbpE@straasha.imrryr.org>
Reply-To: ietf-smtp@ietf.org
References: <59a4ba6c024e3cdc2c10dc6edc673ef7@n0.lt> <606733B6.3080609@isdg.net> <1fef5201d846d503151e4e63fda10e97@n0.lt> <YGdoXbtlHMhiGxaw@straasha.imrryr.org> <72bb746bfe938835e1c6d7f58792e668@n0.lt>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <72bb746bfe938835e1c6d7f58792e668@n0.lt>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/YJrQKq3eKR8ZzYCA8X-7HKsCjfg>
Subject: Re: [ietf-smtp] =?utf-8?q?MTS-STS_validation_when_MX_host_points_to_?= =?utf-8?q?a_CNAME=2C_violating__RFC_2181_=C2=A7_10=2E3?=
X-BeenThere: ietf-smtp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of issues related to Simple Mail Transfer Protocol \(SMTP\) \[RFC 821, RFC 2821, RFC 5321\]" <ietf-smtp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf-smtp/>
List-Post: <mailto:ietf-smtp@ietf.org>
List-Help: <mailto:ietf-smtp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 02 Apr 2021 23:13:49 -0000

On Fri, Apr 02, 2021 at 11:50:04PM +0300, Kristijonas Lukas Bukauskas wrote:

> > The error indicated is indeed misleading, since the problem appears
> > to rather be a mismatch between the CNAME-expanded MX hostname and
> > the "mx: " field of the MTA-STS policy.  The certificate matches
> > either name, so isn't plausibly the problem:
> > 
> > mx.n0.lt. IN CNAME n0.lt.
> > n0.lt. IN A 188.166.32.32
> 
> So that's the failed MX Host Validation, as described in [RFC8461], 
> section 4.1, that sending MTA seems to claim to be the problem. Correct?

Yes, that's my interpretation of the outcome.  Their MTA-STS validator
detected a mismatch between the MTA-STS policy MX hostname and the
CNAME-expanded MX hostname.

You can test this by updating the MTA-STS policy to include both forms
of the MX hostname (and sunsequently change the "id" field of the
MTA-STS TXT record).  If the problems go away, that'll confirm the
hypothesis.

> If so, what error should the reporter use, as per [RFC8460], in an 
> aggregated TLS report?

You'd have to look at RFC8460, where I don't actually see a good fit
for this case... :-(

> validation-failure?

That seems about the closest.

-- 
    Viktor.