Re: [dmarc-ietf] Additions to draft - Security Considerations

Scott Kitterman <sklist@kitterman.com> Mon, 25 April 2022 03:56 UTC

Return-Path: <sklist@kitterman.com>
X-Original-To: dmarc@ietfa.amsl.com
Delivered-To: dmarc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 82BDE3A1D7F for <dmarc@ietfa.amsl.com>; Sun, 24 Apr 2022 20:56:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=kitterman.com header.b=IbuRdghs; dkim=pass (2048-bit key) header.d=kitterman.com header.b=GEVY0JiW
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 09dpWy18iXxI for <dmarc@ietfa.amsl.com>; Sun, 24 Apr 2022 20:56:48 -0700 (PDT)
Received: from interserver.kitterman.com (interserver.kitterman.com [64.20.48.66]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9CDEC3A1D80 for <dmarc@ietf.org>; Sun, 24 Apr 2022 20:56:48 -0700 (PDT)
Received: from interserver.kitterman.com (interserver.kitterman.com [IPv6:2604:a00:6:1039:225:90ff:feaa:b169]) by interserver.kitterman.com (Postfix) with ESMTPS id 311FCF8023A for <dmarc@ietf.org>; Sun, 24 Apr 2022 23:56:47 -0400 (EDT)
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=kitterman.com; i=@kitterman.com; q=dns/txt; s=201903e; t=1650859007; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type : from; bh=N79Zf6l2A2yesfbaNZcDmObZYB6wfLaMUBXbKA4F6vE=; b=IbuRdghsOHh8C4O3Zu3Ox49rtx+ZQ1C27tcKpMuRrdru0puTMQdbrtWLqZ7JvgKhF5EKc 54K7N4k2VLGDofHBQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kitterman.com; i=@kitterman.com; q=dns/txt; s=201903r; t=1650859007; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type : from; bh=N79Zf6l2A2yesfbaNZcDmObZYB6wfLaMUBXbKA4F6vE=; b=GEVY0JiWIBfqyOhOAlgHJEr4AGV0l2shDhNniL5VH/RtxkPOvbiiK43/AXnqrT+0SqMZh iwpGXa2Nw335BPHoMn1F0fbetiOFz6/qtvwoGxpbxLhkOlsDWwepgr3N1fBhK2c2nMTw8rO obZBQG3RGU5g4Nwql446aaKpxVKQSUBytV98tP22GMzaoKvw4o2MNIFlSWZi+8h2fXC13AE QKxJs0fdiZDw6oqK1Q/2f0VA0GafABlATfp/LNpMcesXvQP32BkrTa+pTx/0+8Bi/EmCY8h 5Ey8M6TCI0Ehq8WOEX8E/BvqpNNH17us3Ml6uXP1K65Hq4xMrB4biThA0Whg==
Received: from zini-1880.localnet (static-72-81-252-22.bltmmd.fios.verizon.net [72.81.252.22]) by interserver.kitterman.com (Postfix) with ESMTP id 14C16F8009F for <dmarc@ietf.org>; Sun, 24 Apr 2022 23:56:47 -0400 (EDT)
From: Scott Kitterman <sklist@kitterman.com>
To: dmarc@ietf.org
Date: Sun, 24 Apr 2022 23:56:46 -0400
Message-ID: <2934216.d6BrxOLGqM@zini-1880>
In-Reply-To: <CAH48Zfz5MWDuQa1DJQE_YK9gAUL4P-se4CeGAGYCf+c6D0ysaA@mail.gmail.com>
References: <CAH48Zfz5MWDuQa1DJQE_YK9gAUL4P-se4CeGAGYCf+c6D0ysaA@mail.gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dmarc/mmypmM1Fz_eeBA2aZboIq0_ZAT8>
Subject: Re: [dmarc-ietf] Additions to draft - Security Considerations
X-BeenThere: dmarc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Domain-based Message Authentication, Reporting, and Compliance \(DMARC\)" <dmarc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dmarc>, <mailto:dmarc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dmarc/>
List-Post: <mailto:dmarc@ietf.org>
List-Help: <mailto:dmarc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dmarc>, <mailto:dmarc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Apr 2022 03:56:54 -0000

On Sunday, April 24, 2022 9:16:04 PM EDT Douglas Foster wrote:
> I have attempted to capture the security-related content of recent
> discussions:
> 
> Security Considerations
> 
> Determination of the Organizational Domain
> 
> DMARC evaluation is highly sensitive to errors in the determination of the
> organizational domain, as the organizational domain is used for the default
> policy (when the RFC5322.From domain does not have a published policy) and
> for determining relaxed alignment.
> 
> If an incorrectly selected organizational domain is actually a parent of
> the correct organizational domain, then relaxed alignment will allow a
> malicious sender to obtain DMARC PASS while impersonating either the parent
> domain or sibling domains.
> 
> If an incorrectly selected organizational domain is actually a child of the
> correct organizational domain, then relaxed alignment will produce an
> incorrect DMARC FAIL when the message is actually authorized by either the
> correct organizational domain or siblings of the incorrectly chosen domain.
> 
> When the RFC5322.From domain does not have a policy record, the
> organizational domain policy is needed to demonstrate DMARC participation
> and to provide the default policy.   In this case, when an incorrect
> organizational domain is selected, and it does not contain a DMARC record,
> then the domain will be treated as not participating in DMARC and the
> domain owner will not receive reports.   If the incorrectly selected domain
> does have a DMARC policy, the applied policy may be different from the
> domain owner’s intended policy, and reporting will go to whatever
> destination is specified by that policy.
> 
> A DNS path may contain a private registration, where a PSO-registered
> domain owner makes subtrees of his domain available to independent
> organizations.   This behavior complicates DMARC organizational
> determination.    Clients of the private registration will have two
> organizational domains in its DNS tree, one at the boundary between the
> private registration client and its private registrar, and another between
> the private registrar and its PSO.  If a private registry is unknown or
> undetected during organizational domain selection, then the registrar
> organizational domain may be incorrectly selected as the client’s
> organizational domain, allowing the client to obtain DMARC PASS while
> impersonating the parent domain or sibling domains.
> 
> Reliance on an externally-authored public suffix list, as specified in
> RFC7489, creates stability problems for domain owners and evaluators.    An
> organization may have their DMARC configuration fully deployed and
> successfully tested, then suddenly develop unexplained and difficult to
> detect problems if the PSL used by evaluators adds an entry which fragments
> the domain’s intended organizational boundaries for email.  Even if the
> domain owner manages to detect the problem, getting it corrected may be
> difficult or impossible.   Since every evaluator operates on an independent
> copy of one or another PSL list, updated at intervals determined by the
> evaluator, the domain owner has no certainty about when or if a correction
> will be replicated to all evaluators.
> 
> Domain owners can minimize the need for determination of an organizational
> domain by publishing a DMARC record for each RFC5322.From domain, and
> applying a DKIM signature which provides strict alignment.  When this
> practice is followed, the organizational domain is only referenced when a
> non-mail subdomain is impersonated by a malicious actor.   This
> configuration allows the SP clause on all policies to be confidently set to
> REJECT.

I think you have a reasonable issue in here, but this is not all security 
considerations.  I also think the point that it's independent of how the 
organizational domain is determined is appropriate.

My assessment is that this is an issue that it is appropriate to document in 
this text:

> > If an incorrectly selected organizational domain is actually a parent of
> > the correct organizational domain, then relaxed alignment will allow a
> > malicious sender to obtain DMARC PASS while impersonating either the
> > parent domain or sibling domains.

I think it needs some work though and can be substantially shorter.  The same 
potential exists for both public and private registrations.

Org domain too low in the tree causing an incorrect rejection isn't a security 
issue though, that's a protocol problem.

How about something like this:

9.7 Determination of the Organizational Domain For Relaxed Alignment

DMARC evaluation for relaxed alignment is highly sensitive to errors in the 
determination of the organizational domain if the RFC5322.From domain does not 
have a published policy.  If an incorrectly selected organizational domain is 
a parent of the correct organizational domain, then relaxed alignment could 
potentially allow a malicious sender to obtain DMARC PASS.  This potential 
exists for both the legacy [RFC 7489] and current [Section 4.8] methods for 
determining the organizational domain.

This issue is completely avoided by use of strict alignment and publishing 
DMARC records for all domains/sub-domains used as RFC5322.From domain in an 
organization's email.

For cases where strict alignment is not appropriate, this issue can be 
mitigated by periodically checking the DMARC records, if any, of PSDs above 
the organization's domains in the DNS tree and (for legacy [RFC 7489] checking 
that appropriate PSL entries remain present).  If a PSD domain publishes a 
DMARC record without the appropriate psd=y tag, organizational domain owners 
can add psd=n to their organizational domain's DMARC record so that the PSD 
record will not be incorrectly evaluated to be the organizational domain.


I think that captures in a more compact form the issue you are (I think 
rightly) concerned about as well as appropriate advice to protocol users on 
how to avoid or mitigate the issue.

Scott K