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

Ray Bellis <> Fri, 08 June 2018 10:27 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id AAD22130E64 for <>; Fri, 8 Jun 2018 03:27:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.901
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id QLLt641R3Dft for <>; Fri, 8 Jun 2018 03:27:19 -0700 (PDT)
Received: from ( []) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 8BF18130E5E for <>; Fri, 8 Jun 2018 03:27:19 -0700 (PDT)
Received: from ([]:64897 helo=rays-mbp.local) by ([]:465) with esmtpsa ( (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1fREc1-0008Ta-1M (Exim 4.72) for (return-path <>); Fri, 08 Jun 2018 11:27:17 +0100
References: <> <> <> <> <> <> <> <> <> <>
From: Ray Bellis <>
Message-ID: <>
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: <>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <>
Subject: Re: [Doh] [Ext] DNS Camel thoughts: TC and message size
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: DNS Over HTTPS <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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.