Re: [dns-privacy] Registry framework for draft-ietf-dprive-early-data

Ilari Liusvaara <ilariliusvaara@welho.com> Tue, 28 July 2020 13:36 UTC

Return-Path: <ilariliusvaara@welho.com>
X-Original-To: dns-privacy@ietfa.amsl.com
Delivered-To: dns-privacy@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9C7F73A0C34 for <dns-privacy@ietfa.amsl.com>; Tue, 28 Jul 2020 06:36:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.63
X-Spam-Level:
X-Spam-Status: No, score=-1.63 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.267, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=no 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 jo6uKenUkVrc for <dns-privacy@ietfa.amsl.com>; Tue, 28 Jul 2020 06:36:34 -0700 (PDT)
Received: from welho-filter4.welho.com (welho-filter4b.welho.com [83.102.41.30]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4277D3A0C3F for <dns-privacy@ietf.org>; Tue, 28 Jul 2020 06:36:33 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter4.welho.com (Postfix) with ESMTP id AA7E66C696; Tue, 28 Jul 2020 16:36:31 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter4.welho.com [::ffff:83.102.41.26]) (amavisd-new, port 10024) with ESMTP id 2ADN4wp0aIG3; Tue, 28 Jul 2020 16:36:31 +0300 (EEST)
Received: from LK-Perkele-VII (84-253-234-84.bb.dnainternet.fi [84.253.234.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPSA id 00ECA2320; Tue, 28 Jul 2020 16:36:28 +0300 (EEST)
Date: Tue, 28 Jul 2020 16:36:27 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: alessandro@ghedini.me
Cc: "dns-privacy@ietf.org" <dns-privacy@ietf.org>
Message-ID: <20200728133627.GA579947@LK-Perkele-VII>
References: <d812edb8-b3b3-d1db-13e8-8da9a945516d@innovationslab.net> <20200722192652.GA486629@LK-Perkele-VII> <20200723115702.GA5505@wakko.flat11.house>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <20200723115702.GA5505@wakko.flat11.house>
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/dns-privacy/Ps_cEJys2rLBb32oNVqBqf_xldQ>
Subject: Re: [dns-privacy] Registry framework for draft-ietf-dprive-early-data
X-BeenThere: dns-privacy@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <dns-privacy.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dns-privacy>, <mailto:dns-privacy-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dns-privacy/>
List-Post: <mailto:dns-privacy@ietf.org>
List-Help: <mailto:dns-privacy-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dns-privacy>, <mailto:dns-privacy-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Jul 2020 13:36:37 -0000

On Thu, Jul 23, 2020 at 12:57:02PM +0100, alessandro@ghedini.me wrote:
> On Wed, Jul 22, 2020 at 10:26:52PM +0300, Ilari Liusvaara wrote:
> > On Wed, Jul 22, 2020 at 12:00:43PM -0400, Brian Haberman wrote:
> > > Hi all,
> > >      I have a proposal for the working group that I would like some
> > > feedback on. https://tools.ietf.org/html/draft-ietf-dprive-early-data-00
> > > calls out the need for an IANA registry to track which RR Types are
> > > allowed to be carried as early data during the TLS session establishment
> > > process. Rather than creating yet another IANA registry, I propose that
> > > we add a column to the current RR Type registry that indicates whether
> > > the RR Type is allowed as early data. For reference...
> > > 
> > > https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4
> > > 
> > > Thoughts on this?
> > 
> > I think this is a Bad Idea.
> > 
> > The fact that RRTYPE is data RRtype (1-127, 256-61439) already
> > establishes it is safe to send as QTYPE in QUERY. Having any unsafe
> > things there would already cause major security issues, as DNS
> > specifications are very clear that servers MUST NOT refuse
> > requests by data QTYPE. Yes, some data TYPEs are special (especially
> > NS, CNAME and some DNSSEC stuff), but it is still requirement to not
> > have any harmful effects.
> > 
> > However, this does not make any of them safe, only that none is
> > specially unsafe. With recursives, bad things happen if network
> > attacker can replay 0-RTT data after cache expiry. At worst, this can
> > completely compromise the query contents. It looks that one could
> > check the ticket age with fairly tight tolerances (failing is only
> > one (likely fast) extra RTT) to prevent this from happening.
> 
> Are you saying we shouldn't have a list of allowed RR types at all and just
> limiting to QUERY messages is enough? I asked this question at the last meeting
> and the responses were mixed.

I was thinking QUERY messges with data TYPE and data CLASS. Which is
subset of QUERY messages.

Looking at the minutes, I see mention of needing to be idempotent.
Actually, I think one wants a stronger property that is analogous to
"safe" in HTTP. And I think all data QUERY are meant to satisfy that
stronger property. More specifically, "safe" roughly means "no state
change", while "idempotent" roughly means "indepdent of order".

And when it comes to problematic behavior, I do not expect the esoteric
types to be the problem, I expect problems to lie in the well-known
types. This is because unless authoritative or recursive server
specifically supports some TYPE, it treats it as plain data. And there
are limited oppurtunities for anything to go wrong with that. And
esoteric types are unlikely to be specially supported. Furthermore,
DNS pretty strongly constrains what recursives can do.

And the types that worry me the most for potential of special handling
are A and AAAA. There are CDNs, which definitely do some very special
stuff with A and AAAA records. Then I have seen some servers that do
special things with TXT records. None of these behaviors is anything
really dangerous (as that would be a major security issue), but could
leak data if requests are replayed.

Then there is RRSIG, which seems bit alarming. While direct queries
should not do anything special, I noticed two troublesome properties:

1) The answers can be pretty large (amplification hazard with UDP).
2) The queries can be really slow compared to other types.

I don't think anything legimately uses direct RRSIG queries. DNSSEC
sends partial RRSIG answers as needed (AFAIK, this is the only case
where DNS data rrsets are not atomic).

And when it comes to early data profiles, I think most define
specicial error code meaning "not allowed in early data, try again"
(e.g., HTTP 425 status), instead of using generic parse error.
New error code in DNS would need EDNS tho (which should not be that
problematic requirement). 

> I'm not against removing the list btw, though I guess it would be helpful to
> hear from people who disagree on why they disagree.

Yes, I would very much like to hear if there are any more unpleasant
surprises lurking here.
 
> > However, there is a potential source of unsafety even in QUERY
> > with data QTYPE: EDNS extensions. The base EDNS is safe and essential.
> > However, EDNS extensions can do who knows what, and some of them might
> > be very much not safe. However, there are some that seem useful.
> > 
> > On useful end, there are various DNSSEC advertisment extensions (e.g.,
> > ??U and edns-key-tag). As well as Extended DNS Error. On dubious end
> > there are things like LLQ and UL (and potentially other stuff as well).
> 
> I guess we can add some text on EDNS to the draft as well.

I suspect coming up with what is useful and what is dubious would
actually need looking at what the various EDNS extensions do. Allow
all or deny all is not likely to be right thing to do.


-Ilari