Re: [DNSOP] fragmentation itself (Re: FYI: draft-andrews-dnsop-defeat-frag-attack)

Tim Wicinski <tjw.ietf@gmail.com> Mon, 15 July 2019 13:35 UTC

Return-Path: <tjw.ietf@gmail.com>
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 748661200C4 for <dnsop@ietfa.amsl.com>; Mon, 15 Jul 2019 06:35:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 2l3gHNw5krL9 for <dnsop@ietfa.amsl.com>; Mon, 15 Jul 2019 06:35:45 -0700 (PDT)
Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2FBDD120090 for <dnsop@ietf.org>; Mon, 15 Jul 2019 06:35:45 -0700 (PDT)
Received: by mail-oi1-x22f.google.com with SMTP id g7so12625125oia.8 for <dnsop@ietf.org>; Mon, 15 Jul 2019 06:35:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=a9Q+db7hDW0ydbzzJRt2iFP8sU9NG2kM4sn8fotaOaE=; b=mbTnKz7UyoWnEL4TVAS8OIh52bV3/OvyrZHteLfLAv1OvTj+EaBGaZzgKrZY/yjP/5 5QkPRtQX5kiwkeHnFnlPYDF6xPuvXk4CPo+LN4iX5SGF0IkYO+nMNqz5SJ9GuGjTAIpV YGCFbZ/MGcAuJNwusEWZuqIuKZDTo2RSpxyvprumUqRUrWHVAXSqIMV7qphWOKKmnuEY yiWRTTkROmA+aECoz2px8m1WXqDKW6FIRHUFaQXWSbViF2iWLe4Cggx8+RLPw9n43B4v JRRPU3qIPDZ6gD9Hj+A+LDrrDWDDdwik9o+gpmenl6zOgmzwBaL2/SDiPzWZzcMwybeN Ve7g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=a9Q+db7hDW0ydbzzJRt2iFP8sU9NG2kM4sn8fotaOaE=; b=s07bd0QR9hNFe75wGFR+uM2zGZbxzc2fI7nV1rfQLXQ34cXJ6Mr64pp5rRo/HrcOER MFjkNVo+fNtBUhQSLyfQFAlTNkAq7xFBmKrIxQwazE/zrQ6iJoHjm3+FE9+BxCOwdgYK PXPOUClFSySNROd98vjcmUcVj6VG3BUBHOZ24tdkGshW7rr7Xhre66jx1R9h47eEtWn1 dD6RbRxEB1sYX/hDfjsWcmm6Js8JNfuXZ/1VYpqS3P4g7uMizdOVrVVVJBjfdNcVLP8O ywhT5VBey9USDOBX6Crvnkc/coSukcwXXeqTtHjzKKFoMbLRnp9Fi+5/P5ZkOTkSK9xj ie3w==
X-Gm-Message-State: APjAAAW58xMZI2f8yScUkGfRQf87TpWdS5RWC5gpmOTEbDbeJEs34zLH f1wQy8TW1vSoEFt+pTBa6635UcbMZcqNXm+R49m3e6EE
X-Google-Smtp-Source: APXvYqymEvU5dbJ0F8WGIWody95Vssg9ocpaGD/hJKL0KAPBpem84RJ5KSVZpwb043b01mu5bbn0v3bxnLzeJwO/JqU=
X-Received: by 2002:aca:b406:: with SMTP id d6mr12911278oif.173.1563197744259; Mon, 15 Jul 2019 06:35:44 -0700 (PDT)
MIME-Version: 1.0
References: <01BAC484-5E62-4573-A162-F3BD4F0DCF34@isc.org> <20190710075028.GA2084@naina> <31268568.A9Z9RF6e3N@linux-9daj> <7E608829-535A-4540-A30F-607434F0E28D@isc.org>
In-Reply-To: <7E608829-535A-4540-A30F-607434F0E28D@isc.org>
From: Tim Wicinski <tjw.ietf@gmail.com>
Date: Mon, 15 Jul 2019 09:35:33 -0400
Message-ID: <CADyWQ+G8O_UOUxeu5CKbu6AoN-Q680BOn3NfOmB9R+9=0-6Ypw@mail.gmail.com>
To: dnsop <dnsop@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000042a8ea058db856da"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/ob2r-tAWDIDirlnG4HUbWB6zyLo>
Subject: Re: [DNSOP] fragmentation itself (Re: FYI: draft-andrews-dnsop-defeat-frag-attack)
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.29
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: Mon, 15 Jul 2019 13:35:49 -0000

The chairs felt that fujiwara-san's draft was one that needed in person
discussion
in Montreal.

Also, if folks did not see his presentation at OARC, here are the slides:

https://indico.dns-oarc.net/event/31/contributions/692/attachments/660/1115/fujiwara-5.pdf

Tim


On Wed, Jul 10, 2019 at 11:17 PM Mark Andrews <marka@isc.org> wrote:

>
>
> > On 11 Jul 2019, at 4:00 am, Paul Vixie <paul@redbarn.org> wrote:
> >
> > i like marka's proposed solution below, a lot. and muks' is also clever,
> > though requiring wire protocol changes. however, fujiwara-san's proposal
> > describes a broader array of fragmentation problems than just integrity,
> and
> > we should be looking at that broader array when making our plans.
> >
> > i think there's a broader question about fragmentation itself. at the
> outset,
> > i knew, when creating EDNS0, that fragmentation was considered harmful:
> >
> > https://www.hpl.hp.com/techreports/Compaq-DEC/WRL-87-3.pdf
> >
> > noting, jeff mogul and chris kanterjiev (kent), authors of the above
> tech
> > report, were two of my mentors and bosses at d|i|g|i|t|a|l from 1988 to
> 1993,
> > so, i read all of their work, and i discussed my questions and
> objections with
> > them. fragmentation was, in ipv4, harmful. there can be no argument at
> this
> > late date. i sinned egregiously in EDNS0 by opening the door to
> fragmentation,
> > and the results have been predictably painful and expensive for
> everybody.
> >
> > however, IPv6 intended to, promised to, and claimed to, fix V4
> fragmentation's
> > many defects. i must have been thinking optimistic thoughts about the
> IPv6
> > time line, and IPv6's promises and intentions, when i opened the
> fragmentation
> > door in EDNS0. what actually then happened was that ICMPv6 as required
> for
> > PMTUD6 was not secure and could not be implemented, which means any
> > fragmentation done in IPv6 (which unlike IPv4, is an endpoint-only
> activity)
> > will be uninformed about path MTU. thus we make pessimistic assumptions
> like
> > 1500 and 1220. and if that's the kind of fragmentation we can actually
> get,
> > then it's a negative value, and fragmentation in IPv6 is as bad, for
> different
> > reasons, than in IPv4.
>
> IPv6 moved fragmentation to the originating node from the router to allow
> for
> faster routers.
>
> As for PMTUD and DNS/UDP it was clear in 1998 that DNS servers would need a
> mechanism to avoid PMTUD issues so I proposed draft-ietf-ipngwg-bsd-frag
> (1998)
> which got incorporated into RFC 3542 (2003) as IPV6_USE_MIN_MTU.  Named
> uses
> that mechanism when the OS supports it.
>
> Limiting transmitted EDNS/UDP responses just moves PMTUD issues to TCP
> unless
> care is taken to limit MSS sizes.  This can be done by a number of
> mechanisms
> but is not universally achievable.  DNS/TCP is not a panacea for DNS/UDP
> fragmentation issues.
>
> PMTUD is a issue for a number of reasons.  Routers still have PTB
> generation on
> the slow path which means that it ends up getting rate limited.  PTB
> generation
> should have been moved into ASICs a decade ago.  Firewalls that block PTB
> packets.
> Packet load balancers that fail to look into the ICMP payload when
> forwarding PTB
> messages.
>
> > therefore, for the reasons set out by fujiwara-san in his recent draft
> posted
> > here, and especially for the reasons spelled out by his extensive
> references,
> > DNS should not use fragmentation. while some of kazunori's examples have
> to do
> > with message integrity and attacks such as the shulman method, the case
> > against fragmentation in DNS's use of UDP is immensely strong. solving
> for the
> > integrity problems doesn't change our conclusion, and adds more
> complexity.
> >
> > i have two final notes, which may help inform those who witnessed the
> sham
> > consensus railroaded (soviet-style) through the recent DNS-OARC meeting
> in
> > bangkok, and heard me speak against outlawing fragmentation as a 2020
> Flag Day
> > goal, and are now hearing me contradict myself.
> >
> > ---
> >
> > first, we need fragmentation to work, which means we need path MTU
> discovery
> > to work, which means we need ICMP to be secure, at least in IPv6. while
> use of
> > fragmentation for DNS UDP has a high cost, the intentional investment of
> that
> > cost would be a beneficial forcing function on fixing fragmentation
> itself.
> > notably, TCP avoids fragmentation through its MSS signaling, which
> defaults to
> > MIN(myMTU, herMTU) minus some fudge factor for protocol headers. which
> means
> > lack of fragmentation does not hurt the web, and so nobody cares about
> it. but
> > we should, all, care about it. i'll explain further in an upcoming
> article
> > which i'll link here, but briefly, 1500 is the wrong LAN MTU for FastE,
> and is
> > insanely small for 1GE, unthinkably wrong for 10GE, laughable for 40GE,
> and
> > engineering malpractice for 100GE. for a test, do a bunch of NFS and SMB
> > tests, over both UDP and TCP for each protocol, using jumbo grams (9K
> MTU) and
> > then again using standard (1500 MTU) sized data grams. watch for
> transfer
> > speed, CPU utilization, and network utilization (as bits, not as
> packets).
> >
> > i will at some point teach FreeBSD TCP how to fragment its first TCP
> segment
> > after synchronization, but only for IPv6. my goal is to force IPv4
> fallback if
> > IPv6 with all of its promised PMTUD and endpoint-only fragmentation does
> not
> > work. let every network operator whose key performance indicators
> include IPv6
> > deployment levels, begin to fear that without its PMTUD promises, IPv6
> is not
> > good enough to replace IPv4, and they will have to plan on investments
> in
> > dual-stack, _forever_.
> >
> > ---
> >
> > second, all mass is energy, and state in the network should be thought
> of as
> > having mass. PMTUD has some scale problems regarding endpoint state
> > requirements, and so, has to work well enough for fast LRU purges of
> state
> > required for endpoint MTU information, which will lead to rapid
> rediscovery.
> > but, TCP protocol control blocks are also state, and state has mass. a
> world
> > in which every recursive iterating server has long-running TCP/853 (DoT)
> > connections open to hundreds or thousands of authority servers is not
> going to
> > be inexpensive, either for the initators or the responders. the web
> works this
> > way, but can require tens of gigabytes of kernel memory for the TCP
> state
> > alone. that's not a good ratio or mass to value. importantly,
> fragmentation
> > has another state mass cost, which is transmitting the fragments with
> enough
> > inter-packet gap to avoid microbursts which overflow the switch port
> buffers,
> > and receiving fragments which must be reassembled before they can be
> > delivered. all of this is wrong.
> >
> > william simpson, perry metzger, and paul vixie (me) worked together
> about ten
> > years ago to create TCP enhancements which would have permitted an
> unlimited
> > number of quiescent but open TCP connections, at a per-connection state
> cost
> > precisely equal to the cost of resisting a SYN flood attack. so, highly
> > compressed state, because state mass is a high cost at the network-wide
> level.
> > we also supported payloads large enough for DNS or WWW queries in the
> > synchronization phase, fixed the security problems around RST, expanded
> the
> > option header space, and saved the window size during periods of
> connection
> > quiescence, allowing back-to-back-to-back transmissions once cookies had
> been
> > exchanged. the result was RFC 6013, which was entirely ignored by the
> people
> > who brought us TCPFO, which has the same incompressible state as TCP,
> adds no
> > security, and reduces only the problem of round trip costs. the other
> document
> > besides RFC 6013 that may be of interest is here:
> >
> > https://www.usenix.org/system/files/login/articles/126-metzger.pdf
> >
> > metzger, simpson, and vixie (me) are all notoriously difficult to work
> with,
> > and this stems from correctable personality defects and unforced human
> > protocols errors for which we should each be periodically upbraided.
> however,
> > ignoring our work because we're somewhat irritating runs the risk of
> taking
> > the internet itself down a blind alley from which a later return won't
> earn us
> > thanks from the grandchildren.
> >
> > ---
> >
> > in summary, the network needs working fragmentation so that it can have
> a
> > future that isn't constrained by the physics of thickwire ten megabit
> > ethernets, and if the DNS community were willing to join the fight, it
> would
> > be a shorter fight. however, DNS, and UDP itself, is better off without
> > fragmentation, because of state mass and complexity costs, regardless of
> > whether we can solve fragmentation's integrity and substitution
> weaknesses.
> > --
> > Paul
> >
> >
> > _______________________________________________
> > DNSOP mailing list
> > DNSOP@ietf.org
> > https://www.ietf.org/mailman/listinfo/dnsop
>
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742              INTERNET: marka@isc.org
>
> _______________________________________________
> DNSOP mailing list
> DNSOP@ietf.org
> https://www.ietf.org/mailman/listinfo/dnsop
>