Re: [DNSOP] DNS cookies and multi-vendor anycast incompatibility

Petr Špaček <petr.spacek@nic.cz> Thu, 21 June 2018 07:24 UTC

Return-Path: <petr.spacek@nic.cz>
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 9EE4B130EB9 for <dnsop@ietfa.amsl.com>; Thu, 21 Jun 2018 00:24:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.02
X-Spam-Level:
X-Spam-Status: No, score=-6.02 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_HI=-5, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 eE6tvAbh_eRe for <dnsop@ietfa.amsl.com>; Thu, 21 Jun 2018 00:24:34 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (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 B118012F1AB for <dnsop@ietf.org>; Thu, 21 Jun 2018 00:24:33 -0700 (PDT)
Received: from [192.168.3.178] (ip-86-49-248-232.net.upcbroadband.cz [86.49.248.232]) by mail.nic.cz (Postfix) with ESMTPSA id 4E3806087E; Thu, 21 Jun 2018 09:24:32 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1529565872; bh=nDqmWnvDIEXwuujjHKKDvpCZhog0SEJna0TFvojhC98=; h=To:From:Date; b=HCJnz5TGCS7M+18Oq9G9oLyk7/uwWABwzcUk2Iwth1rzBu9erfqtzZ3LxkwRCYdHZ E1MASu1UbAzIQDztuhoUThuqjOBep1SJObw2zoxO2lVAW6m+aebwbjlK3pF4dcyzKs 64W5JlBEVtr5kgb1cDY0eIxjVt6aSrU3hJ3XmDlw=
To: Mark Andrews <marka@isc.org>
Cc: "dnsop@ietf.org WG" <dnsop@ietf.org>, Daniel Salzman <daniel.salzman@nic.cz>
References: <c70f058c-8e82-f905-e352-f3e2fd0d4cfc@nic.cz> <alpine.LRH.2.21.1806201006530.6077@bofh.nohats.ca> <107c3532-a07d-9821-70ab-94c00a9dd2f0@nic.cz> <9A860D2F-C02D-4D89-B54D-7FDA9823101B@isc.org>
From: Petr Špaček <petr.spacek@nic.cz>
Openpgp: preference=signencrypt
Autocrypt: addr=petr.spacek@nic.cz; prefer-encrypt=mutual; keydata= xsFNBFhri/0BEADByTMkvpHcvPYwyhy0IDQ1B2+uU6AWP0QJQB3upM/YqxoJBeMQ5SxpO+W6 BsU0hTIF90AKIgiiDtMH1oNhHnzRXqePKORIgL3BbH5OxGcbqCYk1fIKk43DliCN1RcbTyRV REnCRQGWMTUbRS/jQ3uyTAX4rT0NhPWhPy6TMLGEg6WJJz0IzhBEw3TitvAlq6XHbi5EZYwU AHqIcuqr3sS+qkWqlIBlahu1hqhTcmYGz7ihjnWkOFi1rjRfLfudAtgFpUSmsixh2tifdy+C d8OBQbtF2kM7V1X5dUzw/nUBXm1Qex2qohRmCspwqivu7nlDMrLoilmPaeoR5evr5hpIDdfP cJAPTJk4n56q6MTHFJWkGa0yq13AJHLANNjQ/dF+W6Dhw9w2KBpuw0iGZQBBf5G9SQ1xJ+tU 9filaldsTAX1gMkVso//kGEbuRIJnJr7Z8foE/zofFyoAv21VWy2vpgQ3CnEWOZMSmYH7/gZ qcM7nfkjk4zAijpjYA3qlXoWa44/nrkAGvt7sAMsxY1C2H7tr3h3/rwyfbBqQ9nMpNwYL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kQ/oAPPM0iJ9kn8NXB/9 iBe5cKEUiiYQfSn9x1HyG0sT3/jSYaq3obmBNHJE24w/RKWoPsaKjoyaInAuU5L0cNZ30OWd eWFREIxlajFl2vXb9nCc80/i6PceJySiyJgd5cYEL4hfn/B6RXph9kAJySsqlIZoBhcwneGX mAS0M41jJjuIQdt5pkLhM9XoXjBFMGGtA/CtiicEgitItJfVCxdLG4bZOCrfPmevMGLxpEmB GouQ9dVQ
Organization: CZ.NIC
Message-ID: <4913e6c8-4e79-fc59-9124-a44428031b4b@nic.cz>
Date: Thu, 21 Jun 2018 09:24:31 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <9A860D2F-C02D-4D89-B54D-7FDA9823101B@isc.org>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/Pm9MX7ZF_rngcm2gX4CPseTjQ6Y>
Subject: Re: [DNSOP] DNS cookies and multi-vendor anycast incompatibility
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.26
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: Thu, 21 Jun 2018 07:24:38 -0000

On 20.6.2018 23:01, Mark Andrews wrote:
>> On 21 Jun 2018, at 12:25 am, Petr Špaček <petr.spacek@nic.cz> wrote:
>>
>> On 20.6.2018 16:10, Paul Wouters wrote:
>>> On Wed, 20 Jun 2018, Petr Špaček wrote:
>>>
>>>> it seems that current specification of DNS cookies in RFC 7873 is not
>>>> detailed enough to allow deployment of DNS cookies in multi-vendor
>>>> anycast setup, i.e. a setup where one IP address is backed by multiple
>>>> DNS servers.
>>>>
>>>> The problem is lack of standardized algorithm to generate server
>>>> cookie from a shared secret. In practice, even if users manually
>>>> configure the same shared secret, Knot DNS and BIND will use diffrent
>>>> algorithm to generate server cookie and as consequence these two
>>>> cannot reliably back the same IP address and have DNS cookies enabled.
>>>>
>>>> One of root server operators told me that they are not going to enable
>>>> DNS cookies until it can work with multi-vendor anycast, and I think
>>>> this is very reasonable position.
>>>>
>>>> So, vendors, would you be willing to standardize on small number of
>>>> server cookie algorithms to enable multi-vendor deployments?
>>>
>>> I think this is a good idea but there are already two examples in RFC
>>> 7873 for cookie generation. Is there a problem with those examples, or
>>> is there only a lack of options in the implementation to configure
>>> these? If the latter, than no new IETF work would be needed.
>>
>> These are mere examples and not specifications with all the details
>> necessary for reliable interoperability.
> 
> The server cookie examples have all the details required to build a interoperable
> implementation.  i.e. with the same inputs you will get the same outputs.

Sorry, I still do not think it is sufficient for interoperable
implementations for multiple reasons:

- Let's assume that serverA has time limit for cookie freshness "1 hour"
and the serverB in the same anycast cluster "2 hours". This will produce
unnecessary BADCOOKIE errors from time to time.

- It is not specified how "Time" sub-field in B.2. is encoded on the
wire so it is not guaranteed that two different implementations will
decode the value in the same way.
(Is it in integer seconds? Unix timestamp? Signed or unsigned? How do we
handle rollover over 0xFFFFFFFF? ...)

- Besides data format we need to explicitly state if sub-fields are big
endinan (I guess) or not, etc.


Also, let me ask why BIND decided to use AES by default instead of
HMAC-SHA256-64 described in the RFC? For me it is appealing to hide
content of the cookie from attacker eyes but I'm not willing to
implement something without proper description and understanding
(cargo-cult algorithms instead of spec, anyone? :-).


So let me ask again:
Are other vendors willing to work on sufficiently detailed
specification? If not just say it!

In that case I will be happy to reply to our friendly root operator that
it is not going to happen, and consequently throw away code for cookies
from Knot Resolver. I do not see value in it without interoperable spec,
just maintenance costs.

Petr Špaček  @  CZ.NIC


>> E.g. when a cookie is "old" according to B.2.?
>> E.g. are there privacy considerations with plain HMAC vs. encryption?
> 
> 
>> Besides this, BIND defaults to AES-based algorithm which is not
>> specified in the RFC and Knot DNS has its own because developers
>> considered the BIND's approch overkill.
>>
>> If we decide to standardize we need to find a reasonable algorihm and
>> standardize all its variables to make it work without run-time
>> synchronization (posssibly except key rotation but it can be done
>> avoided as well).
>>
>> This message is for other DNS vendors to see if there is an interest in
>> standardizing something we can all share and operators use in practice.
>>
>> -- 
>> Petr Špaček  @  CZ.NIC