[secdir] Review of draft-ietf-marf-dkim-reporting-11

Tero Kivinen <kivinen@iki.fi> Tue, 06 March 2012 16:01 UTC

Return-Path: <kivinen@iki.fi>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4EA9821F89CB; Tue, 6 Mar 2012 08:01:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.572
X-Spam-Level:
X-Spam-Status: No, score=-102.572 tagged_above=-999 required=5 tests=[AWL=0.027, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bEfHYulxIP3a; Tue, 6 Mar 2012 08:01:14 -0800 (PST)
Received: from mail.kivinen.iki.fi (fireball.acr.fi [83.145.195.1]) by ietfa.amsl.com (Postfix) with ESMTP id 94DC421F8768; Tue, 6 Mar 2012 08:01:13 -0800 (PST)
Received: from fireball.kivinen.iki.fi (localhost [127.0.0.1]) by mail.kivinen.iki.fi (8.14.3/8.14.3) with ESMTP id q26G1A44006981 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Mar 2012 18:01:10 +0200 (EET)
Received: (from kivinen@localhost) by fireball.kivinen.iki.fi (8.14.3/8.12.11) id q26G19jk020747; Tue, 6 Mar 2012 18:01:09 +0200 (EET)
X-Authentication-Warning: fireball.kivinen.iki.fi: kivinen set sender to kivinen@iki.fi using -f
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <20310.13509.461991.185885@fireball.kivinen.iki.fi>
Date: Tue, 06 Mar 2012 18:01:09 +0200
From: Tero Kivinen <kivinen@iki.fi>
To: iesg@ietf.org, secdir@ietf.org
X-Mailer: VM 7.19 under Emacs 21.4.1
X-Edit-Time: 20 min
X-Total-Time: 19 min
Cc: draft-ietf-marf-dkim-reporting.all@tools.ietf.org
Subject: [secdir] Review of draft-ietf-marf-dkim-reporting-11
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/secdir>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 16:01:15 -0000

I have reviewed this document as part of the security directorate's 
ongoing effort to review all IETF documents being processed by the 
IESG.  These comments were written primarily for the benefit of the 
security area directors.  Document editors and WG chairs should treat 
these comments just like any other last call comments.

This document adds a way to DKIM verifier to send reports to the DKIM
signer when something goes wrong with the signature verification.

It provides two fold authentication to verify that signer has really
requested the reports to protect signers from bogus reports: The
DKIM-Signature field of the email in question needs to have tag "r=y"
to indicate signer wants to see reports, and the _report._domainkey
subdomain needs to have TXT record which also indicates that signer
really wanted these reports.

This is all fine, but the security considerations section should
really point out that the TXT record is the only part that is really
protecting the signer from distributed bogus reports. Even if signer
does not ever put "r=y" tag in any of the messages, but still
publishes the TXT records "just in case" they ever want to get those
reports, the attacker can modify every single email in transit to
include bogus DKIM-signature field with "r=y" and "d=" matching the
signer and DKIM verifiers will start flooding reports to the signer.
Note, that those emails do not even need to be originally have
anything to do with the domain being attacked.

Actually just adding "r=y" to valid DKIM-Signatures will cause the
signature to fail (if I have understood things correctly), thus
triggering the report.

So the only way the signer can protect himself against bogus reports
is to remove the TXT records from the DNS. There should be text about
this in the security considerations sections, as otherwise
adminstrators might put those TXT records out there just in case they
are needed, and open themselves to the attack.


On the other hand, even when signer requests reports to verify nobody
is messing up its DKIM-Signatures the attacker can remove the "r=y"
tag from the email (or the whole DKIM-Signature) and in that case the
verifier do not send report to the signer (unless the Author Domain
Signing Practices (ADSP) is in use, but I didn't really check whether
those records are checked if no DKIM fields are found in the email).

Attacker who wants to modify the emails do not want to advertise this,
thus it will of course remove the "r=y", so it can fly under the
radar...

The proposed Extension to the DKIM-Signature tag does not really
protect or detect against attacks, but it might be useful for
debugging and detecting misconfigurations in the system.

I think the DKIM-ADSP extensions are more useful for detecting
attacks, as those will be checed even when there are no DKIM-Signature
fields in the email (at least I think so, as otherwise they could not
report "unsigned" messages.

----------------------------------------------------------------------

There is also some smaller issues:

----------------------------------------------------------------------
ADSP is not spelled out ever, and the reference to the RFC5617 uses
different title than what is the actual title of the RFC5617:

	"DomainKeys Identified Mail (DKIM) Author Domain Signing
	Practices (ADSP)"

	vs

	"DKIM Sender Signing Practises".

so it was bit hard to see what ADSP actually meant, until I actually
checked the RFC5617. I am not sure why the references are getting
wrong titles, as shouldn't the
http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml
references get those directly from RFCs. On the other hand it might be
the references are written out manually...
----------------------------------------------------------------------
In section 4:

      only.  To construct the actual address to which the report is
      sent, the Verifier simply appends to this value an "@" followed by
      the domain whose policy was queried in order to evaluate the
      sender's ADSP, i.e., the one taken from the RFC5322.From domain of
							^^^
      the message under evaluation.  Therefore, a signer making use of
      this extension tag MUST ensure that an email address thus
      constructed can receive reports generated as described in
      Section 6.  ABNF:


It seems there is extra . between the "RFC5322" and "From".
----------------------------------------------------------------------
In section 5:

   This memo also includes, as the "ro" tags defined above, the means by
				    ^^

I do not think this document defines "ro" tag, I assume it was meant
to mean "rr" tag instead?
----------------------------------------------------------------------
In section 5.2:

How can DKIM ADSP failures ever report "d" type errors, as if they
have DNS issues for fetching ADSP records, they will not get the "rr"
tag saying "d" or "all" types should be reported...
-- 
kivinen@iki.fi