Re: [DNSOP] [dns-operations] dnsop-any-notimp violates the DNS standards

"Darcy Kevin (FCA)" <kevin.darcy@fcagroup.com> Wed, 11 March 2015 00:07 UTC

Return-Path: <kevin.darcy@fcagroup.com>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9D4FF1A8940 for <dnsop@ietfa.amsl.com>; Tue, 10 Mar 2015 17:07:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5] autolearn=ham
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 mXScw0m1hIXC for <dnsop@ietfa.amsl.com>; Tue, 10 Mar 2015 17:07:45 -0700 (PDT)
Received: from odbmap01.extra.chrysler.com (odbmap01.out.extra.chrysler.com [129.9.40.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 157F01A8830 for <dnsop@ietf.org>; Tue, 10 Mar 2015 17:07:45 -0700 (PDT)
Received: from shbmap04.shdc.chrysler.com (Unknown_Domain [53.28.160.92]) by odbmap01.extra.chrysler.com (Symantec Messaging Gateway) with SMTP id 62.BF.10691.F478FF45; Tue, 10 Mar 2015 20:07:43 -0400 (EDT)
X-AuditID: 81092818-b7f406d0000029c3-f9-54ff874ff21a
Received: from mail.chrysler.com (Unknown_Domain [151.171.240.11]) by shbmap04.shdc.chrysler.com (Symantec Messaging Gateway) with SMTP id 82.53.19252.F478FF45; Tue, 10 Mar 2015 20:07:43 -0400 (EDT)
Received: from 038-CH1MPN1-043.038d.mgd.msft.net ([169.254.3.90]) by 038-CH1MMR1-009.038d.mgd.msft.net ([151.171.240.11]) with mapi id 14.03.0224.003; Wed, 11 Mar 2015 00:07:42 +0000
From: "Darcy Kevin (FCA)" <kevin.darcy@fcagroup.com>
To: Paul Wouters <paul@nohats.ca>
Thread-Topic: [DNSOP] [dns-operations] dnsop-any-notimp violates the DNS standards
Thread-Index: AdBbjvnv+CZ/7hUhS9aibbMNhryxDA==
Date: Wed, 11 Mar 2015 00:07:42 +0000
Message-ID: <49DEE35910F1A6438E9805F4DEBBA3071275A49C@038-CH1MPN1-043.038d.mgd.msft.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.143.13.209]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOLMWRmVeSWpSXmKPExsViKrMgRte//X+IwZFl2hb75x9msrj75jKL xftbl5gcmD2eNh1i9liy5CeTx/d5TAHMUVw2Kak5mWWpRfp2CVwZhx43MRW06VasfnaZrYFx v0oXIyeHhICJxJ/Le1ghbDGJC/fWs3UxcnEICVxglGhb1MEKU3Rz62sWiMQJRokFH/8wQji7 GCVu965iB6liA6paeOUuM4gtIqAoMenMIxYQm1kgReJ16xo2EFtYIFhiTv8dJoiaEIlX0xew QNh6Eu9WLAazWQRUJR5M7QWr5xWIkHjSeQDMZgQ67/upNUwQM8Ulbj2ZzwRxnYDEkj3nmSFs UYmXj/9BXa0osWnRZkaIeh2JBbs/sUHY2hLLFr5mhpgvKHFy5hMWiPopbBI/uwsnMIrPQrJi FpL2WUjaZyFpX8DIsopROj8lKTexwMBQL7WipChRLzmjqLI4J7VILzk/dxMjMPIaOTUkdjA+ mst7iFGag0VJnDfsi2egkEB6YklqdmpqQWpRfFFpTmrxIUYmDk6pBsZU9tdMnlYFNwsFjz8u 6pin1Xhzi8rNc/ELs8xZ14SumbjhGHtpy6VZMRKxleLbtvRVOrL9vsQkf+G0qeG5pb47/aLV mJ0+1dgF8V7KFb+o0b5Mc+sG3WfWc7UcLDarNOWuOxrPdu26FMeF1wcVSuwFazex70v/zZF7 58sSoaILS5Ws/R1Mw5RYijMSDbWYi4oTAQb6noCKAgAA
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsUyffUHbl3/9v8hBgd7pSz2zz/MZHH3zWUW i/e3LjE5MHs8bTrE7LFkyU8mj+/zmAKYo7hsUlJzMstSi/TtErgyDj1uYipo061Y/ewyWwPj fpUuRk4OCQETiZtbX7NA2GISF+6tZ+ti5OIQEjjBKLHg4x9GCGcXo8Tt3lXsIFVsQB0Lr9xl BrFFBBQlJp15BNbNLJAi8bp1DRuILSwQLDGn/w4TRE2IxKvpC1ggbD2JdysWg9ksAqoSD6b2 gtXzCkRIPOk8AGYzAl3x/dQaJoiZ4hK3nsxngrhOQGLJnvPMELaoxMvH/1ghbEWJTYs2M0LU 60gs2P2JDcLWlli28DUzxHxBiZMzn7BMYBSZhWTsLCQts5C0zELSsoCRZRWjVHFGUm5igYGJ XnFGSrJeckZRZXFOapFecn7uJkZgtJjKLIjewTjrhvwhRmkOFiVx3i15h0KEBNITS1KzU1ML Uovii0pzUosPMTJxcEo1MDr1LS+rsfIp4IurvWzrdKhfceHNbZMMz/+9n3HQrGBnjuiPjw1p M1q7SmvksgX8Dx+WFo5bvb849Hjd2hTXZ6uTr83cMHX+cvOG1a0h8Zs/Z3PzrV7hobM/h2Hn MbvbXBKNFz5MFem+nZGmNln3UlZTT/hHz4QnGbx/RHf2+i3befD81r2TziqxFGckGmoxFxUn AgCpSRwvZAIAAA==
Archived-At: <http://mailarchive.ietf.org/arch/msg/dnsop/9oOnp4tB7pV5Mjoupacj4c4M6WE>
Cc: "dnsop@ietf.org" <dnsop@ietf.org>, "dns-operations@dns-oarc.net" <dns-operations@dns-oarc.net>
Subject: Re: [DNSOP] [dns-operations] dnsop-any-notimp violates the DNS standards
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Wed, 11 Mar 2015 00:07:47 -0000

Regarding the statement "query type ANY 'matches all RR types CURRENTLY IN THE CACHE'."

Actually, there's nothing in RFC 1034 that clearly *mandates* this behavior -- Section 3.7.1 says only that a QTYPE of * "matches all RR types", whereas Section 5.3.3 ("Algorithm") says to return "the answer" or "the data" if it's in the cache, but this is ambiguous with respect to QTYPE=* (other than the highly-improbable case that we have RRsets for every possible RR type, how can we know we have "the answer"/"the data" in our cache, given that the QTYPE "matches all RR types" at the node and there might be other RRsets extant which don't happen to be cached at the time? Is an answer really "the" answer if we can't be sure that it satisfies the matching rule of the QTYPE definition?).

People cite the examples of Section 6.2.2 as definitive evidence that QTYPE=* queries can always be satisfied by whatever happens to be laying around in a cache, but they don't seem to notice that those were *non-recursive* queries in the examples, and it's their *non-recursiveness* that gives rise to the lack of rigor in returning a response (as it is whenever a non-recursive query is sent to a DNS entity that doesn't happen to be authoritative for the relevant zone). The required fetching behavior of a caching resolver in response to a *recursive* QTYPE=* query, is basically undefined by RFC 1034. Common practice is to treat QTYPE=* queries as effectively non-recursive, despite RD being set to 1, if *any* relevant RRset exists in the cache. Possibly, this is because the Section 6.2.2 examples were misunderstood. Or, simply because it was easier to code that way. A more modern concern would be that this rigor could be abused for possible DoS attacks. But, at this point in DNS history, I doubt we can roll back the clock and force everyone to be rigorous in fetching answers for QTYPE=* queries. So the answers are inherently unreliable, and that situation is not likely to change, unless and until someone invents an "ALL" QTYPE/RR-type/meta-type. 

											- Kevin

-----Original Message-----
From: DNSOP [mailto:dnsop-bounces@ietf.org] On Behalf Of Paul Wouters
Sent: Monday, March 09, 2015 10:48 AM
To: D. J. Bernstein
Cc: dnsop@ietf.org; dns-operations@dns-oarc.net
Subject: Re: [DNSOP] [dns-operations] dnsop-any-notimp violates the DNS standards

On Mon, 9 Mar 2015, D. J. Bernstein wrote:

> My "qmail" software is very widely deployed (on roughly 1 million SMTP 
> server IP addresses) and, by default, relies upon ANY queries in a way 
> that is guaranteed to work by the mandatory DNS standards.

And you've been told for two decades that this was wrong?

> Specifically, query type ANY "matches all RR types" for that node on 
> that server.

Wrong, query type ANY "matches all RR types CURRENTLY IN THE CACHE". So the result of qmail's ANY query is completely meaningless and qmail cannot derive any conclusion from the absence of any record from that query.

So if the MX or AAAA record has expired from the cache but another RRtype with larger TTL (say NS) is still in there, your ANY query will fail to find records. qmail with this feature is broken.

Additionally, Tony Finch did a write up of qmail's ANY problems too:
https://fanf.livejournal.com/122220.html

> In new software today I would sacrifice these efficiency benefits for 
> the sake of simplicity, but this doesn't mean that I'm going to 
> frivolously inflict retroactive punishment upon administrators who 
> have installed standards-compliant software and done nothing wrong.

You have had 10 years to fix it. Luckilly, I believe most distributions shipping qmail add the patch to fix this already.

> I understand how a sufficiently large site might acquire the 
> impression that it can safely take radical action at its own whim, 
> violating the existing protocol standards

Uhm, we pointd out qmail's _bug_ for a decade. I'm quite sure even you do not need to interop with BIND4 anymore.

> Apparently Firefox recently deployed ANY queries. I haven't looked at 
> the details but I gather that they're related to the well-known 
> annoyances of handling AAAA etc. Firefox was browbeaten into reverting 
> this change on the basis of highly questionable claims regarding
> amplification: "It can return enormous result sets, and some 
> authoritative servers have taken to refusing ANY queries because of 
> the frequency with which such queries show up in amplification 
> attacks" -> "I'm concerned about amplification and the perception 
> thereof by security monitors."

No, they were also told that ANY queries only return data from the cache, and using ANY queries means you might miss actual A or AAAA records. This has nothing to do with ANY queries and amplification.

> The common theme of CNAME/MX/A and A/AAAA is that there's widepread 
> interest in being able to easily retrieve multiple record types. What 
> I'm saying is not that query type ANY is the ultimate answer (clearly 
> it can be improved); what I'm saying is that these are protocol 
> issues, and that protocol changes need to be handled by an 
> appropriately chartered IETF working group.

I agree there is a use for this. I tried a few years ago to introduce a new EDNS0 option that would allow you to query for a bitmap number of RRsets, but people did not like it. Perhaps the WG is ready for something like this now.

Paul

_______________________________________________
DNSOP mailing list
DNSOP@ietf.org
https://www.ietf.org/mailman/listinfo/dnsop