Re: [tsvwg] Intdir early review of draft-ietf-tsvwg-udp-options-19

Tom Herbert <tom@herbertland.com> Wed, 15 February 2023 23:27 UTC

Return-Path: <tom@herbertland.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 A3952C17EA4C for <tsvwg@ietfa.amsl.com>; Wed, 15 Feb 2023 15:27:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=herbertland.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nl7MffnPh-pC for <tsvwg@ietfa.amsl.com>; Wed, 15 Feb 2023 15:27:45 -0800 (PST)
Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 16319C16B5BC for <tsvwg@ietf.org>; Wed, 15 Feb 2023 15:27:45 -0800 (PST)
Received: by mail-pj1-x1036.google.com with SMTP id nh19-20020a17090b365300b00233ceae8407so381736pjb.3 for <tsvwg@ietf.org>; Wed, 15 Feb 2023 15:27:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=herbertland.com; s=google; t=1676503664; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wObfVWAeJndE0C6D/1KIgfAeTpLiHjgX5OKtg/3TzBk=; b=eFk+SZJtz7b17qqUHUlxioiQ+n/gsTaeFgpMI8vkuI9dPLqyVhhcpX558rG7gTUmXU 1s+W+QZvibcpWxpQ15XWhfjeV+H2X7Td9UVk1e2dI9sC47g62SeNdK2rDhri+956m+dA f4YLCG+4lvvMZgHYVuqmmFNFzY/m9uKGo+DaFVlkNKxmaiivVoNwesR1POzI6qNBr3dA /+uRw0JpkQKoCjdPhWHFR6rvcq7qNGA3a/BREtg+ujH/dMTiWu8JT8hWgGlxWBX23oV9 I4kS6+K234u76prLCeRC/PK9kpG7hznmtjnnfAEiTxApqejLd8T8vvycJ5/At5eFWpsA Oeew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676503664; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wObfVWAeJndE0C6D/1KIgfAeTpLiHjgX5OKtg/3TzBk=; b=uCgGMf7RyedLHlh+DTI8dC2npHYPDPsUG8vWK9wuom01yuL4F/hYy7FxJAsoW4py7D CAX/i8gS/Wwn+F5KQ5teq+RPu5hVp2omu8cRGwbUxJjzLhnIFo8M0QK7yHGssuAv9rng JX5KchqWqG0sT7ynDoIQBqD0GiQty08iIINVPdAvfoS64A6KOtPL4WE3OL37o7PJ/Jv4 mq+4ZoA4VaWa8XroGp0+iVp1szaG5+hlwiwt6SDQZdcCd2zJ3IdRseMrJ/XEuiR44Il/ fJ0nyu+0sNVK7tYGz8VmJIOB0hJYf81YGtGY8hy9G9ZreOvDs3++cI1jhNw4BtqKu7QZ dsIQ==
X-Gm-Message-State: AO0yUKVreaN94bxOMar7t/SQTRixfYQh1J9Vpmgyu+vogmiQ2s25h0NG M0WqvRTtWS0M3zWFOPvfBt8rkd07pDlUSbwF2Bj8DQ==
X-Google-Smtp-Source: AK7set+nWfHldg+v3x0cjWkYJOVFA0+aYwFlNjMTVNTr28Ym3QgOY8sy434bgNoE6Sqw2pU8cgQVfsViDpDBo5Cc1kY=
X-Received: by 2002:a17:903:244b:b0:199:14bd:3440 with SMTP id l11-20020a170903244b00b0019914bd3440mr945639pls.6.1676503664024; Wed, 15 Feb 2023 15:27:44 -0800 (PST)
MIME-Version: 1.0
References: <167599146728.42049.10916891372133731811@ietfa.amsl.com> <CBCA1F49-73BC-4242-B162-2B743F23FAAF@strayalpha.com> <0E3756C7-E473-4B3A-9D6D-C43DA3C89C91@cisco.com> <CACL_3VHcMe87XnETGAzwpdPZK_HnY4KLKyHyyj-EXBo=WWNcMA@mail.gmail.com> <B743425D-38C0-49B8-B391-7AC6E51D9B1A@cisco.com> <CACL_3VFDHhmJL2_WXV60d-tyyfE8tkW8P6rwtcBOox4mxsHRzQ@mail.gmail.com> <CALx6S35T+H5ETDJVEawbOSs7EeBO7wbvmRSvH0+TfZiTXhK5cQ@mail.gmail.com> <CACL_3VFrtuDS4FW1xWzzdB4LGibrUWSvTgWi1ashh=D1hvFaNQ@mail.gmail.com> <CALx6S34qG0uv4tj1gzZxL7LZUeX6V1vEwYJ9A9Ybtszh074ovA@mail.gmail.com> <BB7783E3-273A-4D83-B4BF-BCE3DA00E609@strayalpha.com> <CALx6S36QovfwXjFmspVP4CgEOwmJzBLGX59c=zsvSGap8sX1gQ@mail.gmail.com> <CACL_3VFDQUjp5ez70RpyptZSOYvso2-QZsRvLhRNyU9p0iMayw@mail.gmail.com> <CALx6S34y6XttaEz_Uod4bSK50F-KArrv-V=HjKAb8v-9oWoM5Q@mail.gmail.com> <CACL_3VGKuk2HU1Hy4bZymUgPJqvhtzS_xSvZ987m58=fZAAXDw@mail.gmail.com> <CALx6S34dEdPgUvTQZda0qb-H3dERzo-3rjsnZ1MyscbJwJwvoQ@mail.gmail.com> <CACL_3VEhA-Jc_GH2isrJjYsheEp0phHdh71ZgRnvBW5tCKYR5A@mail.gmail.com> <CALx6S3551sms4q_yKh8QYqeedB3uoK9ZRMNrDtVLoMxe-ENX5g@mail.gmail.com> <CACL_3VFFoX93feS-Q8XTy6rDf6Xa6vwnCB75swohp-bPqrxdEA@mail.gmail.com>
In-Reply-To: <CACL_3VFFoX93feS-Q8XTy6rDf6Xa6vwnCB75swohp-bPqrxdEA@mail.gmail.com>
From: Tom Herbert <tom@herbertland.com>
Date: Wed, 15 Feb 2023 15:27:31 -0800
Message-ID: <CALx6S37MNYft1bMUsEcuUj9iobtX7dTF-o+N1vShTQ7yARVDwQ@mail.gmail.com>
To: "C. M. Heard" <heard@pobox.com>
Cc: Joe Touch <touch@strayalpha.com>, "Carlos Pignataro (cpignata)" <cpignata@cisco.com>, "int-dir@ietf.org" <int-dir@ietf.org>, "draft-ietf-tsvwg-udp-options.all@ietf.org" <draft-ietf-tsvwg-udp-options.all@ietf.org>, "tsvwg@ietf.org" <tsvwg@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/v55Lg0WBpmLgcq9sioIQF3g1Iv0>
Subject: Re: [tsvwg] Intdir early review of draft-ietf-tsvwg-udp-options-19
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.39
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: Wed, 15 Feb 2023 23:27:48 -0000

On Wed, Feb 15, 2023 at 2:55 PM C. M. Heard <heard@pobox.com> wrote:
>
> On Tue, Feb 14, 2023 at 9:50 AM Tom Herbert wrote:
> > On Mon, Feb 13, 2023 at 3:08 PM C. M. Heard wrote:
> > > Section 7 of the draft currently says:
> > >
> > >    Like the UDP checksum, the OCS is optional under certain
> > >    circumstances and contains zero when not used. UDP checksums can be
> > >    zero for IPv4 [RFC791] and for IPv6 [RFC8200] when UDP payload
> > >    already covered by another checksum, as might occur for tunnels
> > >    [RFC6935]. The same exceptions apply to the OCS when used to detect
> > >    bit errors; an additional exception occurs for its use in the UDP
> > >    datagram prior to fragmentation or after reassembly (see Section
> > >    9.4).
> > >
> > > If this guidance is too slender, how should it be improved?
> >
> > Mike,
> >
> > The casual reference to RFC6935 is a good example of why this text is
> > insufficient. RFC6935 and RFC6936 were created to allow UDPv6 packets
> > to have a zero checksum. The UDP checksum was required in IPv6
> > (RFC2460) because, unlike IPv4, the IPv6 header doesn't contain a
> > header checksum; the UDP checksum includes the pseudo header that
> > covers the IPv6 address. So the UDPv6 checksum is needed as an
> > integrity check of the IPv6 addresses, and the primary risk of using
> > CS=0 with UPDv6 is the potential for misdelivery when addresses are
> > corrupted. That is the primary consideration of RFC6935 and RFC6936.
> > Note that it is a misnomer that those RFCs allow a zero UDPv6 checksum
> > for all packets, in fact it is a narrowly defined exception applicable
> > to tunnel protocols under specific circumstances. Also note, in
> > RFC8086 (GRE over UDP), it still took three pages of requirements to
> > show how the specific protocol meets the requirements of RFC6935 and
> > RFC6936. IMO an offhand statement that the exceptions of RFC6935 and
> > RFC6936 are applicable for a new protocol is trite.
>
> You have a point here.
>
> > While the risk RFC6935 and RFC6936 is packet misdelivery, the risk of
> > UDP options is misinterpretation of protocol in a packet. UDP options
> > present an entirely different problem and the means to address it will
> > be different. The UDP checksum is completely independent and has no
> > correlation to the bits of the surplus space, the UDP checksum does
> > not cover the surplus space and neither is there any coverage if "UDP
> > payload is already covered by another checksum".
>
> That's not entirely true. In the case of a reassembled UDP datagram,
> the entire datagram and any trailing options will have been covered
> by the OCS of the UDP fragments, if it is present. For that reason, it
> it is perfectly reasonable to omit both the UDP checksum and OCS in the
> reassembled datagram -- as noted in this text from Section 7:
>
>    an additional exception occurs for its use in the UDP datagram prior
>    to fragmentation or after reassembly (see Section 9.4).
>
> The considerations would be different of course if OCS on the UDP
> fragments were not present ... I will have more to say about this below.
>
> > So the "The same
> > exceptions apply to the OCS" are not valid since the exceptions refer
> > to the UDP checksum which has different properties and different
> > risks. Without a proper code point, the protocol of the surplus space
> > needs to be determined solely based on the contents of the space, not
> > the UDP checksum nor anything else in the packet, and any means of
> > this determination is probabilistically correct. The probability of
> > misinterpretation with a checksum is 1/65,536 which is presumably
> > sufficient. If the idea is to forgo the checksum, then one would
> > expect a quantitative analysis of both the probability of
> > misinterpretation and the risks of misinterpretation.
> >
> > That being said, I see no zero value in making the checksum optional.
> > Aside from its critical role in validating the surplus is indeed UDP
> > options, UDPv6 packets are required to have a non-zero checksum so the
> > OCS is required for all of IPv6 (again RFC6935 and RFC6936 are narrow
> > exceptions). Furthermore, TCP, the original transport layer protocol
> > with options, and IPv4 have had a checksums since the beginning and we
> > don't see people complaining about the performance of those.
>
> Actually, I am mostly in agreement with this point ... much of the
> motivation for UDP with CS=0 has faded as hardware checksum offload has
> become a thing. And even back in RFC 1122 (October 1989) we see:
>
>             DISCUSSION:
>                  Some applications that normally run only across local
>                  area networks have chosen to turn off UDP checksums for
>                  efficiency.  As a result, numerous cases of undetected
>                  errors have been reported.  The advisability of ever
>                  turning off UDP checksumming is very controversial.
>
> Situations where we still see what IMO is legitimate resistance to UDP
> checksums -- and which is part of what motivated RFC 6935 and RFC 6936
> -- are implementations that have limited access to packets, i.e., that
> have full access to the first N bytes of the packet but not to the
> remainder. In such instances tunnelling protocols can insert UDP headers
> but cannot calculate a full UDP checksum. It is conceivable that such a
> a tunnel could implement UDP fragmentation but, lacking access to the
> whole packet and so could not compute the OCS for the fragments. In that
> case the inner packet, whatever it is, would have its own headers and
> trailers, which should be completely covered by appropriate transport
> checksum(s) -- e.g., by the TCP checksum, if it is a TCP segment, or
> by the UDP checksum and OCS, if it is a UDP datagram with UDP options.
> In this case the outer UDP fragments would legitimately have UDP CS=0
> and OCS=0, by obvious extension of RFC 6935 and RFC 6936.

Mike,

Okay, that may be a valid argument to make the surplus checksum
optional when the UDP length is 8 and it's a UDP tunnel, but to
require it in all other cases. The "tunnel" aspect of the requirement
would be that described in RFC6935 and RFC6936, however note that the
requirement would need to apply to IPv4 tunnels also since the risk of
misinterpretation is present in both UDPv4 and UDPv6 but the
misdelivery risk of RF6935 and RFC6936 is specific to IPv6.

Tom

>
> On Wed, Feb 15, 2023 at 8:49 AM Gorry Fairhurst <wrote:
> > I for one also think that last para on whether OCS needs to be required
> > in all cases is something that needs to be considered carefully.
>
> There may be a case to be made for tightening the constraints on when
> UCP CS=0 is acceptable, but I do not think that it should be banned
> outright. There is a case to be made that it is appropriate and useful
> under certain circumstances, some of which are discussed above.
>
> On the other hand, there are two very practical reasons for requiring
> OCS <> 0 when UDP CS <> 0. First, as noted in the draft, it bypasses
> an annoying but apparently common middlebox error (see
> https://datatracker.ietf.org/meeting/103/materials/slides-103-maprg-a-tale-of-two-checksums-tom-jones),
> and second, it greatly facilitates hardware checksum offload (see
> https://mailarchive.ietf.org/arch/msg/tsvwg/9_1YWp-TApI9mcCuia8U6jfCwTA/).
>
> So I see coupling the two as quite logical.
>
> Mike Heard