Re: [tsvwg] UDP Options: on forcing the use of UDP CS=0 in connection with FRAG+LITE

"C. M. Heard" <heard@pobox.com> Tue, 02 July 2019 17:33 UTC

Return-Path: <heard@pobox.com>
X-Original-To: tsvwg@ietfa.amsl.com
Delivered-To: tsvwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D519E120664 for <tsvwg@ietfa.amsl.com>; Tue, 2 Jul 2019 10:33:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.698
X-Spam-Level:
X-Spam-Status: No, score=-2.698 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pobox.com; domainkeys=pass (1024-bit key) header.from=heard@pobox.com header.d=pobox.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 fYbfXcC9ivL5 for <tsvwg@ietfa.amsl.com>; Tue, 2 Jul 2019 10:33:23 -0700 (PDT)
Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 45260120689 for <tsvwg@ietf.org>; Tue, 2 Jul 2019 10:33:22 -0700 (PDT)
Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 952EF75FC5 for <tsvwg@ietf.org>; Tue, 2 Jul 2019 13:33:20 -0400 (EDT) (envelope-from heard@pobox.com)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=sasl; bh=iQ1GU3LlgkaQRYvD/PKVjug+jSQ=; b=Y40VHg HdsdekOEMb2Haz10rZXbT9MtUfNyZW5+n6iOXr+bghi3s+Xb77FVc+qPInHpPNqp R/cLlCRL8hfLdBeKl5aj8OvaF+6CgGLgqFYHxveDX0nh2myMuUe44kH5yOoXmh2I 1ilk2467Stw5L2VR5OXL/nN7lFskpqQpu7CbY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; q=dns; s=sasl; b=GiYnsVok+q7WcaqsCfS/NVKpnXjNpAzH wQmg2OjffVVkphiGYR18IjMTqvbYasGJVFVA5MAS7C+pDiKZ8lunTbKU4P6eTgzc zdk5ES9i4eQPON9D1iRcRX0+VjxNeiG2xfjkknMonldup/iVhXrP+G/ucYAY4Iqp lcRWfJ87faU=
Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 8E01475FC4 for <tsvwg@ietf.org>; Tue, 2 Jul 2019 13:33:20 -0400 (EDT) (envelope-from heard@pobox.com)
Received: from mail-io1-f48.google.com (unknown [209.85.166.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 2E8B675FC3 for <tsvwg@ietf.org>; Tue, 2 Jul 2019 13:33:18 -0400 (EDT) (envelope-from heard@pobox.com)
Received: by mail-io1-f48.google.com with SMTP id w25so38892510ioc.8 for <tsvwg@ietf.org>; Tue, 02 Jul 2019 10:33:18 -0700 (PDT)
X-Gm-Message-State: APjAAAV1oVtYbZmbcIsEZyWR4O3K7eV/r1J8YxfXr4dflFAc6IPhlx9T 4eclyVY9Cfityw7TGU4Ui+akVS65SKGkWHxqk+Y=
X-Google-Smtp-Source: APXvYqzyGTq4mBmZ6cKXXZJ6P9J3hb3IoyxZyKlB+JTLrmHIjPZ/yXPHDlQg9OD4cTm1OZuGba50wHn/ui1BwcAy4+g=
X-Received: by 2002:a02:ca57:: with SMTP id i23mr35399624jal.25.1562088797016; Tue, 02 Jul 2019 10:33:17 -0700 (PDT)
MIME-Version: 1.0
References: <CACL_3VHGtMz3htgfFLRGhjXm=qC7kOXQs+cchtamhh-giBnpLA@mail.gmail.com> <CALx6S35T9ApzMaoSVgHSJPpcpfXsbHHogoBbEjMPj6vH-kxYeA@mail.gmail.com> <CACL_3VE6kr33Vk5si5AxSZNmhqysZZGoy6HK37COUgwbvcRkdA@mail.gmail.com> <24692A9B-4AF1-4E32-A760-7D4908A61262@strayalpha.com> <CACL_3VExhAdFCu-kFLLO5DeRYUOFyJztUgJg-vQmnPoecvzeJg@mail.gmail.com> <CALx6S34zY74fhqbXxmiyturfu5mxFjRtA4=R48haX9tP6qLcow@mail.gmail.com>
In-Reply-To: <CALx6S34zY74fhqbXxmiyturfu5mxFjRtA4=R48haX9tP6qLcow@mail.gmail.com>
From: "C. M. Heard" <heard@pobox.com>
Date: Tue, 02 Jul 2019 10:33:04 -0700
X-Gmail-Original-Message-ID: <CACL_3VE5kOqQq6nHqwthXF4=j8KJse5_X5gek0w6j6UdsUuQ2w@mail.gmail.com>
Message-ID: <CACL_3VE5kOqQq6nHqwthXF4=j8KJse5_X5gek0w6j6UdsUuQ2w@mail.gmail.com>
To: Tom Herbert <tom@herbertland.com>
Cc: Joe Touch <touch@strayalpha.com>, TSVWG <tsvwg@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000da9d68058cb623f5"
X-Pobox-Relay-ID: 7AC018A8-9CEF-11E9-878B-8D86F504CC47-06080547!pb-smtp21.pobox.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/n0T4Y3fwaAzPABpy-2_aIcCgWKA>
Subject: Re: [tsvwg] UDP Options: on forcing the use of UDP CS=0 in connection with FRAG+LITE
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tsvwg/>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Jul 2019 17:33:26 -0000

On Mon, Jul 1, 2019 at 2:56 PM Tom Herbert wrote:
> On Mon, Jul 1, 2019 at 12:16 PM C. M. Heard  wrote:
> > On Sat, Jun 29, 2019 at 7:58 AM Joe Touch wrote:
> > >
> > > See sec 8.1, which incorporates rfc 6936:
> > >
> > >          As an exception to the default behavior, protocols that use
UDP
> > >          as a tunnel encapsulation may enable zero-checksum mode for a
> > >          specific port (or set of ports) for sending and/or receiving.
> > >          Any node implementing zero-checksum mode must follow the
> > >          requirements specified in "Applicability Statement for the
Use
> > >          of IPv6 UDP Datagrams with Zero Checksums" [RFC6936].
> > >
> > > Frag is a kind of such a tunnel because it adds its own reassembly CS.
> >
> > I'll agree that FRAG+LITE with UDP CS=0 does conform to the requirements
> > in RFC 6936 Sections 4 and 5 because it includes a reassembly CS.
> >
> The reason that UDPv6 checksums were required in the first place is
> that IPv6, unlike IPv4, has no header checksum. The pseudo header in
> the UDP checksum includes the IP addresses which provides protection
> against misdelivery when addresses are corrupted. The UDP options
> reassembly checksum doesn't include the pseudo header so it provides
> no protection of the IP addresses, and hence I don't believe it
> satisfies the requirements of RFC6936 for using a zero UDP checksum.

Tom, after a more careful review of the relevant specifications I am
coming around to your point of view on this matter.

The normative requirements in RFC 6936 are in Section 4 (which defines
requirements and recommendations on the implementation of IPv6 nodes
that support the use of a zero UDP checksum) and in Section 5 (which
defines requirements and recommendations for protocols and tunnel
encapsulations that are transported over IPv6 without performing a UDP
checksum calculation). Section 3.41 of RFC 8085
<https://tools.ietf.org/html/rfc8085#section-3.4.1> reiterates these
requirements and levies another requirement of its own, which is stated
in the last bulleted paragraph below:

   o  Use of the UDP checksum with IPv6 MUST be the default
      configuration for all implementations [RFC6935].  The receiving
      endpoint MUST only allow the use of UDP zero-checksum mode for
      IPv6 on a UDP destination port that is specifically enabled.

   o  An application that supports a checksum different than that in
      [RFC2460] MUST comply with all implementation requirements
      specified in Section 4 of [RFC6936]
<https://tools.ietf.org/html/rfc6936#section-4> and with the usage
      requirements specified in Section 5 of [RFC6936]
<https://tools.ietf.org/html/rfc6936#section-5>.

   o  A UDP application MUST check that the source and destination IPv6
      addresses are valid for any packets with a UDP zero-checksum and
      MUST discard any packet for which this check fails.  To protect
      from misdelivery, new encapsulation designs SHOULD include an
      integrity check at the transport layer that includes at least the
      IPv6 header, the UDP header and the shim header for the
      encapsulation, if any [RFC6936].


So, to fully comply with existing requirements, FRAG+LITE with forced
CS=0 over IPv6 would have to conform with the following, even when
the user leaves the UDP checksum enabled for non-fragmented packets:

1.) The implementation would have to default to disabling FRAG+LITE,
i.e., unless the application using a particular port specifically
requests it, do not transmit datagrams fragmented in this manner and
do not accept datagrams fragmented in this manner (RFC 6936 Section 4,
requirements 2-5, RFC 6936 Section 5 requirement 1, and first bulleted
paragraph above). Ideally, this would be an API switch distinct from
those that allow UDP CS=0 in general, so that allowing it for FRAG+LITE
would not open up the floodgates for arbitrary UDP CS=0 datagrams. This
would require updates to Section 9 of draft-ietf-tsvwg-udp-options-07
<https://tools.ietf.org/html/draft-ietf-tsvwg-udp-options-07#section-9>.

2.) A transport layer checksum must be provided. The reassembly CS in
draft-ietf-tsvwg-udp-options-07 satisfies this requirement.

3.) A UDP application, or the transport layer working on its behalf,
MUST verify that the source and destination IPv6 addresses are valid
in any received packet that uses FRAG+LITE with CS=0 (RFC 8085 Section
3.4.1, last bulleted paragraph above). This is possible for the client
end of simple request-response protocols such as DNS or (with suitable
initial handshakes that don't rely on CS=0) for both ends of a UDP
application that sets up long-lived sessions between peers. It is not
possible for a general server that does not know (and cannot establish
during session setup) the source from which it will receive a packet.

4.) In order to cope with middleboxes that discard UDP datagrams with
CS=0, a UDP application that uses FRAG+LITE with forced CS=0 SHOULD
have a means to detect paths with high loss rates (RFC 6936 Section 5,
objectives 6 and 7). This is possible only for applications that use
long-lived flows.

>From my perspective, (1) and (2) are pretty much a wash between
FRAG+LITE with CS=0 and the new alternative proposed in
https://mailarchive.ietf.org/arch/msg/tsvwg/Wv--BLVMPAX6g5umok9BQsXAEGg:
the new proposal provides a transport checksum of equivalent strength,
and we still want application control over whether UDP fragmentation is
enabled (which IMO should be on a per-port basis and should not happen
by default). The new proposal does not disable the UDP checksum and so
is not subject to (3). That is a big deal in my book, because (3) is a
major burden. And (4) does not apply to the new proposal unless the
application explicitly requests UDP CS=0, in which case it applies anyway.

Mike