Re: [DNSOP] Review of draft-andrews-dnsop-defeat-frag-attack-00

Mark Andrews <marka@isc.org> Mon, 16 November 2020 00:50 UTC

Return-Path: <marka@isc.org>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2BC9C3A0B9C for <dnsop@ietfa.amsl.com>; Sun, 15 Nov 2020 16:50:18 -0800 (PST)
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 AkPgC1TEqxel for <dnsop@ietfa.amsl.com>; Sun, 15 Nov 2020 16:50:16 -0800 (PST)
Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) (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 3C4C43A0B60 for <dnsop@ietf.org>; Sun, 15 Nov 2020 16:50:16 -0800 (PST)
Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id 14F9D3AB118; Mon, 16 Nov 2020 00:50:16 +0000 (UTC)
Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id EAADA160047; Mon, 16 Nov 2020 00:50:15 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id DA9FD16006B; Mon, 16 Nov 2020 00:50:15 +0000 (UTC)
Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hnA6LgKviUpP; Mon, 16 Nov 2020 00:50:15 +0000 (UTC)
Received: from [172.30.42.68] (n114-75-120-99.bla3.nsw.optusnet.com.au [114.75.120.99]) by zmx1.isc.org (Postfix) with ESMTPSA id 1B35B160047; Mon, 16 Nov 2020 00:50:14 +0000 (UTC)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\))
From: Mark Andrews <marka@isc.org>
In-Reply-To: <20201115143240.GA726984@jurassic.vpn.mukund.org>
Date: Mon, 16 Nov 2020 11:50:11 +1100
Cc: dnsop@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <56206930-0A0C-4690-AADF-DD0C38D40A98@isc.org>
References: <20201115143240.GA726984@jurassic.vpn.mukund.org>
To: Mukund Sivaraman <muks@mukund.org>
X-Mailer: Apple Mail (2.3445.9.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/ch56sSOOXvLD20Xgn5rGiOZco6w>
Subject: Re: [DNSOP] Review of draft-andrews-dnsop-defeat-frag-attack-00
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Nov 2020 00:50:18 -0000


> On 16 Nov 2020, at 01:32, Mukund Sivaraman <muks@mukund.org> wrote:
> 
> Hi Mark
> 
> After the paper from last week about a new variant of a Kaminsky style
> attack, I remembered seeing an email from you recently asking to adopt
> the well-known TSIG key idea. I looked for it but I'm not able to find
> such an email - did I imagine it? Anyway my review comments follow.

It was in a reply to another message.

https://mailarchive.ietf.org/arch/msg/dnsop/soU1ngMVl3EMCc1IjgO-q098H2E

> There have been a few proposals to prevent forms of off-path UDP
> response poisoning which include Kaminsky style attacks, IP fragment
> poisoning, etc. Your well known TSIG key idea is a good one and this
> draft is well-written. I think I'd mentioned this to you privately as
> well when you first brought up well known TSIG key that it was a nice
> idea. The proposal has the potential to prevent all forms of off-path
> UDP DNS response posioning for plain DNS over UDP going forward.
> 
>>                Defeating DNS/UDP Fragmentation Attacks
>>               draft-andrews-dnsop-defeat-frag-attack-00
> 
> I suggest changing the title of this draft to something like "Well-known
> TSIG key", because the proposal helps more than just defeating IP
> fragmentation attacks. A marketing title is easier to remember too. When
> talking about it we're going to call it well-known TSIG key anyway, so I
> suggest naming it so.

We can do that if it is adopted.

>> 2.  The Well Known Key
> 
>>   The well known key has a owner name of "." and uses HMAC-SHA256
>>   [RFC4635] as its algorithm with a key of 256 zero bits.
> 
>>   Should it become necessary to roll the well known key's algorithm, an
>>   updated RFC should be published with new algorithm and matching key
>>   definition.  The standard TSIG error response of NOTAUTH/BADALG can
>>   be used to signal to try alternate algorithms.
> 
> Is it necessary to prescribe any one algorithm, if we can assume the
> HMAC secret to be all 0s?

Yes.  We don’t want people have to guess what should work. 

>>   It is possible for servers to support multiple algorithms
>>   simultaneously by trying each in turn.  Not all existing servers
>>   support trying multiple algorithms/keys for the same name.
> 
> I have not followed the sentence why servers would have to try multiple
> algorithms in turn - doesn't the TSIG RR contain the algorithm name?

It does.

>> 3.  Using The Well Known Key
> 
>>   Clients should opportunistically attempt to use the well known key
>>   and if they get an expected error they should fallback to not using
>>   the well known key unless they have already had a successful
>>   transaction using the well known key or have a priori knowledge that
>>   the well known key is supported.
> 
> Is there a possibility of an off-path downgrade attack due to this?

Yes.

>>   All members of a anycast cluster of servers should use the same well
>>   known keys.
> 
> I did not follow this. From the description, there is only one
> well-known key - all zeros, so it is not clear what is meant by "same
> well known keys". Did you mean "all members of an anycast cluster should
> all implement well-known keys?”

Clients learn about the properties of a server and make decisions about the
properties of the queries they send and how they handle the responses. 

When there is a anycast server, all servers that make up the anycast server
need to present the same set of properties to the client.

>>   When sending a request a 64 bit nonce should be added to the TSIG
>>   Other Data section to increase the entropy of the request.  The TSIG
>>   Other Data section currently unused in TSIG requests.
> 
> The nonce in the other data field is well thought out. I suggest
> imposing a minimum of a 64-bit nonce, but not otherwise limiting the
> nonce's size as it isn't required.

If you are also sending something like a DNS COOKIE a nonce is not needed
as there will already be more than enough entropy in the request.

> RFC 2845 section 4.5.2 (TIME check and error handling) states:
> 
>> If the server time is outside the time interval specified by the
>> request (which is: Time Signed, plus/minus Fudge), the server MUST
>> generate an error response with RCODE 9 (NOTAUTH) and TSIG ERROR 18
>> (BADTIME).  The server SHOULD also cache the most recent time signed
>> value in a message generated by a key, and SHOULD return BADTIME if a
>> message received later has an earlier time signed value.
> 
> On the public internet, multiple clients would use the same well known
> key, and their clocks may be out of sync. Also, due to path conditions,
> different clients' requests generated at the same absolute time may
> arrive separated by multiple seconds at the server. So queries arriving
> with time signed value in the past would be quite common.  The above
> requirement should be relaxed for the well-known TSIG key.  This
> proposal does not need to prevent transaction replay attacks, so all
> TSIG time checks can be disabled for the well-known TSIG key.
> 
> As it requires implementation changes, you may want to consider other
> aspects of this draft and see if you want to change anything.
> 
> At a bigger picture, considering DNS transport security proposals that
> are being worked on and the existing DNSSEC protocol, one could question
> if there is a pressing need to add this for plain DNS over UDP. However,
> given how prevalent DNS over UDP is expected to be for some time, and
> the potential for off-path UDP response poisoning that keeps coming up
> again and again, I support adoption.
> 
> 		Mukund
> _______________________________________________
> DNSOP mailing list
> DNSOP@ietf.org
> https://www.ietf.org/mailman/listinfo/dnsop

-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742              INTERNET: marka@isc.org