Re: [Doh] [Ext] DNS Camel thoughts: TC and message size

Ray Bellis <ray@bellis.me.uk> Fri, 08 June 2018 10:27 UTC

Return-Path: <ray@bellis.me.uk>
X-Original-To: doh@ietfa.amsl.com
Delivered-To: doh@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AAD22130E64 for <doh@ietfa.amsl.com>; Fri, 8 Jun 2018 03:27:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-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 QLLt641R3Dft for <doh@ietfa.amsl.com>; Fri, 8 Jun 2018 03:27:19 -0700 (PDT)
Received: from hydrogen.portfast.net (hydrogen.portfast.net [188.246.200.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8BF18130E5E for <doh@ietf.org>; Fri, 8 Jun 2018 03:27:19 -0700 (PDT)
Received: from 88-212-170-147.customer.gigaclear.net ([88.212.170.147]:64897 helo=rays-mbp.local) by hydrogen.portfast.net ([188.246.200.2]:465) with esmtpsa (fixed_plain:ray@bellis.me.uk) (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1fREc1-0008Ta-1M (Exim 4.72) for doh@ietf.org (return-path <ray@bellis.me.uk>); Fri, 08 Jun 2018 11:27:17 +0100
To: doh@ietf.org
References: <20180606093212.GA23880@server.ds9a.nl> <alpine.DEB.2.11.1806061501340.10764@grey.csi.cam.ac.uk> <F5774061-35B9-477F-ADDA-8BB3472F30EF@icann.org> <CAOdDvNq9g3ghbg9fkfhP+ZA4-6E5oDNFCGo6NN9bydqUX76cLA@mail.gmail.com> <20180607093647.GB32326@server.ds9a.nl> <CAOdDvNriZDjU9yqUQjqN4fO84ENPWO3si-QePiKRgt+7VJVK0g@mail.gmail.com> <23321.27027.73356.94056@gro.dd.org> <CAOdDvNr=kLHPCtCHRx4=rpA1oDogQqdAJ0nR156BWABiFP_bzA@mail.gmail.com> <20180607215851.GA32738@server.ds9a.nl> <CAOdDvNqNpZ8fKPCO5sEqjROBHjg4wx-GGPMYSSynode10jeC0Q@mail.gmail.com>
From: Ray Bellis <ray@bellis.me.uk>
Message-ID: <4d37f79d-df25-7b23-eca3-fb9a69f0d1e2@bellis.me.uk>
Date: Fri, 8 Jun 2018 11:27:17 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <CAOdDvNqNpZ8fKPCO5sEqjROBHjg4wx-GGPMYSSynode10jeC0Q@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/doh/GB4V4twti27HPhn6b6A_f4JTyi0>
Subject: Re: [Doh] [Ext] DNS Camel thoughts: TC and message size
X-BeenThere: doh@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: DNS Over HTTPS <doh.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/doh>, <mailto:doh-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/doh/>
List-Post: <mailto:doh@ietf.org>
List-Help: <mailto:doh-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/doh>, <mailto:doh-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Jun 2018 10:27:22 -0000

On 08/06/2018 10:34, Patrick McManus wrote:

> Even for that I would appreciate a citation of where the problem lays
> - there isn't agreement that wireformat actually has such a limit
> (though its existing transports do and maybe that's what should be
> noted), and no particular implementation choices, much less widely
> deployed and hard to upgrade implementations, have been cited (again
> - I'm not saying they don't exist.).

There are likely numerous existing DNS implementations that currently
assume that a 64kB buffer is large enough for any possible DNS message.

I know I've written code that does that, because notwithstanding it's a
limitation of UDP and a limitation of the chosen framing mechanism used
when carried in TCP (but not of TCP itself, mind), it *is* the defacto
limit on the size of a DNS message.

I can allocate a buffer of 64kB, even on the stack, safe in the
knowledge that it's "big enough".  It's a trivial amount of RAM by
today's standards but it avoids a lot of dynamic buffer allocation
and/or re-sizing.

I would also be unsurprised to find DNS server software with enforced
64kB limits on the total size of an RRset.   Whilst I believe AXFR does
permit RRsets to be split across message boundaries, the QUERY opcode
does not (they have to be treated as a single atomic unit) so RRsets
that exceed that size are effectively useless.

I would be OK with special case treatment for AXFR in DOH, but *please*
don't mess with the normal message size constraints for standard queries.

Ray