Re: [tsvwg] I-D Action: draft-ietf-tsvwg-udp-options-23.txt

Tom Herbert <tom@herbertland.com> Tue, 26 September 2023 23:52 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 49917C13AE23 for <tsvwg@ietfa.amsl.com>; Tue, 26 Sep 2023 16:52:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 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, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=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 6Rh4iknNEnET for <tsvwg@ietfa.amsl.com>; Tue, 26 Sep 2023 16:52:22 -0700 (PDT)
Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (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 BEF26C13AE2D for <tsvwg@ietf.org>; Tue, 26 Sep 2023 16:52:21 -0700 (PDT)
Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-59c0d002081so121720167b3.2 for <tsvwg@ietf.org>; Tue, 26 Sep 2023 16:52:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=herbertland.com; s=google; t=1695772340; x=1696377140; darn=ietf.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=70n5xD+LOyaf1lMfZe6nckmgFA7V7+uxTR2n5WJ9K/o=; b=NYZ400eQKo29GDQn/mOWlr9hV8nAxayi9Te5EAnmxQyV0SwHnw9NLvEU2UeE5O10se la3tdswh3QagvXgbXqGQujm7Bdphw/nnAROOqWGdf7tTwatc3l3ehSlBMlMW3qGV1WJD ws5G4oWHmQX3UUfMilkBxf/36Ac9FJ6aFpvQ/AFDBw1GLd6lp0eZ6TGTtvBqljJGGTzB zEMp1tdkIoLtZPtHhmb4MH1i+IbiLu2yldPlcfvEbJodX5dVxvorPQqa20Gdc/4OjYWq erP7nsu8LE705M87pG943gZJ4x/L5Obgn4a50fUxeDcRfzfT4VhiEYwAWeEo1UDyInJ1 X+/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695772340; x=1696377140; h=content-transfer-encoding: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=70n5xD+LOyaf1lMfZe6nckmgFA7V7+uxTR2n5WJ9K/o=; b=inXayZaMCujyZfOBgxfe3Kz8wx4fKc2A2w2qresvglLS+FRt0Pb1oRjQpmzpc3e1k/ iSjzasW71wpI7pvgG0E2XolKaX5G7qFWDeJKDwcy6Alhm8fq4NOf7jonppcc39l68YPK iS0Sq1q2JVXCLacacYSH98Ebbao1nRCyoyL/JeqGmFIG7vlyTb+9BgXYBogCSeCtnNdJ H6NqOdsPJyu9puznF1yYk8VwMgWeTj1j46mxwksWW6lOETGDVOA3ad6AheClsxTrKrgl h3y8qBw76nBe/EKBfuD0d/PN9ebiLoeE/Kihiv+2Uip1YIK143f6SWU1BWJKb67l60Ej TyCA==
X-Gm-Message-State: AOJu0YxjaZf5xBpiB52i2ZErqTbk2MJgHrIdij8wlu+R0Z2USKKi3jVd Kk3jyzEH13D6XkiErp7sgpaXbbQRNr7IPz95gHNrDs72rSOiwnHC3o8=
X-Google-Smtp-Source: AGHT+IGcL0GiMjbNEDHS7RuB/0ySQhPkAhkmrRfpHndwnUV4puQ/Q3+TSRy+YDP6D5t6Hf9EcWC26To6uxk5oVjJRgM=
X-Received: by 2002:a81:5247:0:b0:59b:51d9:1d6e with SMTP id g68-20020a815247000000b0059b51d91d6emr521924ywb.6.1695772340612; Tue, 26 Sep 2023 16:52:20 -0700 (PDT)
MIME-Version: 1.0
References: <CALx6S37B1kdkqKcbSzqBLOTd95gc2XZXu1utS_YKyL_Cow4Xyw@mail.gmail.com> <DB21D756-1D32-4EA3-A15E-7A3E800DB3F1@strayalpha.com>
In-Reply-To: <DB21D756-1D32-4EA3-A15E-7A3E800DB3F1@strayalpha.com>
From: Tom Herbert <tom@herbertland.com>
Date: Tue, 26 Sep 2023 16:52:08 -0700
Message-ID: <CALx6S36ssP-MfsTevduBekmnKsvabLBjNLFzJW3Pbm6yNGuoZA@mail.gmail.com>
To: Joe Touch <touch@strayalpha.com>
Cc: "C. M. Heard" <heard@pobox.com>, Gorry Fairhurst <gorry@erg.abdn.ac.uk>, TSVWG <tsvwg@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/4LtYoc8CraWYhOTj4zIBQAeJFN4>
Subject: Re: [tsvwg] I-D Action: draft-ietf-tsvwg-udp-options-23.txt
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: Tue, 26 Sep 2023 23:52:27 -0000

On Tue, Sep 26, 2023 at 4:05 PM Joe Touch <touch@strayalpha.com> wrote:
>
> The rules require that, for safe option, the receiver decides what it accepts it accepts.
>
> Different receivers are absolutely allowed to have different views. The default MUST be legacy receivers do”.
>
> That’s not at all analogous to how quantum mechanics works, btw.

Joe,

It is, except for the fact that an external observer can intercept the
packet with the CRC and just based on the contents to determine if the
packet is corrupted. In that case there is *only* *one* right answer
that can be deduced solely based on the rules governing the system and
no observer bias.

>From a more practical perspective, the draft: " The Alternate Payload
Checksum (APC, Kind=2) option provides a stronger alternative to the
checksum". Whether it's stronger than checksum seems to be conditional
on whether the receiver processes the option. If a receiver just
ignores the option then clearly the checksum is stronger. The problem
is there is no mechanism for a sender to know whether the CRC is going
to be ignored by the receiver if it is a SAFE option. If I were
deploying a  UDP application in a network that is sensitive to data
corruption, I really want a CRC that is guaranteed to work. The rule
is simple: either the receiver validates that CRC is correct or the
packet is dropped. If UDP options allow a third possibility where the
packet could be accepted even though it's corrupted then I wouldn't
use APC. I would try to get the required behavior by putting the CRC
in the application data (which a lot of application layer protocols do
anyway).

Tom




>
> Joe
>
> > On Sep 26, 2023, at 1:13 PM, Tom Herbert <tom@herbertland.com> wrote:
> >
> > On Tue, Sep 26, 2023 at 12:36 PM touch@strayalpha.com
> > <touch@strayalpha.com> wrote:
> >>
> >> Hi, Tom,
> >>
> >> Remember that (as currently defined) APC succces/failure is passed to the application. An application that wants to enforce it can. It’s not simply ignored. The receiver doesn’t decide whether to check APC or not, it (currently) decides what to do if/when APS fails.
> >>
> >> Yes, this allows two endpoints to act differently. There are a variety of reasons why this could be the case - e.g., APC would fail if there were bit errors, but it would also fail if the data were somehow otherwise manipulated by a node that doesn’t support UDP options, e.g., for port rewriting. An endpoint that accepts and allows that can do what it wants.
> >>
> >
> > So rules of the protocol allow the same packet to simultaneously be
> > considered both corrupted and uncorrupted, it is only when a biased
> > receiver observes the packet that we decide which one it is. I'm going
> > to call that Schrodinger's packet :-)
> >
> >> That’s not non-determinism; it’s self-determinism. Again, this is a USER protocol and the user decides.
> >>
> >> However, the current definition of all SAFE options *is based on acting like a legacy node* unless explicitly configured otherwise. That is the definition of SAFE.
> >>
> >> Joe
> >>
> >> —
> >> Dr. Joe Touch, temporal epistemologist
> >> www.strayalpha.com
> >>
> >> On Sep 26, 2023, at 10:52 AM, Tom Herbert <tom@herbertland.com> wrote:
> >>
> >> On Tue, Sep 26, 2023 at 8:49 AM Joe Touch <touch@strayalpha.com> wrote:
> >>
> >>
> >> I disagree with use of unsafe option formats simply to force option support.
> >>
> >>
> >> Joe,
> >>
> >> It's not simply to force option support, it's to enforce correctness
> >> and determinism of the protocol. If a packet contains a CRC that isn't
> >> checked and the packet data is corrupted such that data is accepted
> >> that would otherwise have been dropped had the CRC been checked, then
> >> I claim the packet has not been processed correctly. Furthermore, the
> >> draft allows that two nodes could receive the exact same UDP options
> >> and UDP payload in a packet where one of them drops the packet as
> >> being corrupted and the other accepts the packet. Which is right? If
> >> you say they are both right then I claim UDP Options is a
> >> non-deterministic protocol .
> >>
> >> Tom
> >>
> >> On Mon, Sep 25, 2023 at 11:58 PM Gorry Fairhurst  wrote:
> >>
> >>
> >> On 26/09/2023 05:30, Joe TOuch wrote:
> >>
> >>
> >>
> >> On Sep 25, 2023, at 7:36 PM, Tom Herbert <tom=40herbertland.com@dmarc.ietf.org> wrote:
> >>
> >>
> >>
> >> On Mon, Sep 25, 2023, 7:35 PM Tom Herbert <tom@herbertland.com> wrote:
> >>
> >>
> >>
> >>
> >> On Mon, Sep 25, 2023, 5:31 PM touch@strayalpha.com <touch@strayalpha.com> wrote:
> >>
> >>
> >> See below.
> >>
> >> —
> >> Dr. Joe Touch, temporal epistemologist
> >> www.strayalpha.com
> >>
> >> On Sep 25, 2023, at 5:21 PM, Tom Herbert <tom=40herbertland.com@dmarc.ietf.org> wrote:
> >>
> >> On Mon, Sep 25, 2023 at 5:08 PM touch@strayalpha.com
> >> <touch@strayalpha.com> wrote:
> >>
> >>
> >> On Sep 25, 2023, at 4:14 PM, Tom Herbert <tom=40herbertland.com@dmarc.ietf.org> wrote:
> >>
> >>
> >>
> >> On Mon, Sep 25, 2023, 3:55 PM touch@strayalpha.com <touch@strayalpha.com> wrote:
> >>
> >>
> >> FWIW,  you can also “require ACS” at the receiver, if you want. That would ensure that ACS was both present and valid.
> >>
> >> UDP options are based on the core rule that senders decide what to offer and receivers decide what’s required.
> >>
> >>
> >> Joe,
> >>
> >> For something like CRC, the sender is in a much better position to decide if it's needed.
> >>
> >>
> >> Whether it is or is not, that’s not something UDP options supports - what UDP supports is based on a bunch of principles, including the need to support legacy receivers. So if something is “required”, the receiver has to demand and check for it.
> >>
> >> For example, if two hosts were communicating over a rack switch, the ACS is probably pointless since Ethernet CRC is sufficient. But, if the hosts were communicating over an unreliable satellite link then ACS might be critical.
> >>
> >>
> >> Or the link/phy layer might have its own checks anyway, e.g., block checksums. End to end errors happen during reassembly or in memory, not all that often on links that aren’t checked, AFAIR.
> >>
> >> In both those cases, it's the sender that has the best view as to what's required because it may require knowledge of the path to the destination. So, if the sender computes the ACS, then the receiver should honor that and verify it.
> >>
> >>
> >> In some other protocol where those semantics can be demanded, perhaps. But remember that anything the sender “demands”, except for encryption, is at best a “request”; receivers always get to decide what they enforce anyway.
> >>
> >>
> >> Joe,
> >>
> >> I believe the general consensus in IETF is that checksum or CRCs may
> >> be optional to send, but not optional to validate when received. The
> >> precedent was established in RFC1122: "If a UDP datagram is received
> >> with a checksum that is non-zero and invalid, UDP MUST silently
> >> discard the datagram."
> >>
> >>
> >> That’s for checksums you know are coming. A legacy receiver won’t know or care.
> >>
> >> UDP option-aware receivers work like legacy receivers UNTIL they are explicitly told otherwise. That’s the basic operational principle.
> >>
> >> So you can tell your receiver to care about ACS if it shows up all the time. Or not.
> >>
> >> Here’s the current text, which follows these principles:
> >>
> >> UDP packets with incorrect APC checksums MUST be passed to the
> >>
> >>  application by default, e.g., with a flag indicating APC failure.
> >>
> >>  Like all SAFE UDP options, APC needs to be silently ignored when
> >>  failing by default, unless the receiver has been configured to do
> >>  otherwise. Although all UDP option-aware endpoints support APC
> >>  (being in the required set), this silently-ignored behavior ensures
> >>  that option-aware receivers operate the same as legacy receivers
> >>  unless overridden.
> >>
> >> For user perspective, if I set the ACS in my packets but the receiver
> >> may or may not validate it then it doesn't seem very useful as a check
> >> for corruption of the sender's data.
> >>
> >>
> >> It is useful when the receiver agrees it is useful.
> >>
> >> I'd probably put a CRC in the UDP
> >> payload instead that I can assure it is always verified by the
> >> receiving application.
> >>
> >>
> >> You can do that if you want, but then it means that it cannot be silently ignored by a legacy receiver.
> >>
> >>
> >>
> >> Right, that's exactly the desired non-deterministic
> >>
> >>
> >>
> >> Deterministic  I meant
> >>
> >> behavior that we want with regards to a CRC. Silently ignoring the CRC also means that data corruption would also be silently ignored.
> >>
> >>
> >>
> >>
> >> So you have two choices:
> >>
> >> 1. Use UDP options with ACS (which is now APC)
> >> a cooperating receiver would know to set APC as required and would drop packets if APC fails
> >>
> >> 2. Create a new application that knows to require APC
> >> so that the application can enforce CRC in the payload
> >>
> >> But if you can do (2), why not do (1) and have the application enforce APC-required?
> >>
> >> Joe
> >>
> >> I'm reading this with some doubt now.
> >>
> >> I think option the above option 2 needs to be strongly discouraged: it provides a place to send an integrity check, but it doesn't protect the parsing of the other options nor their data, which would leave all other fields unprotected. That check would better be provided within the application data, and we ought to remove this option if that is all it does.
> >>
> >> Here is what I thought had been designed:
> >>
> >> I expect a sender chooses whether to add an APC option.
> >>
> >> If a receiver receives the APC option, the receiver must to either:
> >>
> >> - discard all datagrams that contain an APC that it decides not to check, or when the APC fails.
> >>
> >> - forward datagrams that contain an APC that passes. (It MIGHT be configured to always expect an APC: which I think is the ONLY receiver decision).
> >>
> >> ... This differs from the benign "use or ignore" processing that applies to most options, but it is exactly the required logic that I would expect and I thought we previously discussed.
> >>
> >>
> >>
> >> Gorry and Tom, the behaviour for which you advocate COULD be achieved if, instead of a SAFE option APC, we specify instead an UNSAFE option UAPC, and stipulate in its definition that the packet is discarded if the integrity check fails. In that case:
> >>
> >> The option, being UNSAFE, would be sent only in the options trailer of a fragmented packet (I refer here to UDP fragmentation, not IP fragmentation). Having the packet encapsulated in (one or more) UDP fragments would ensure that a legacy receiver would not process the packet at all, and the fact that the option is UNSAFE would ensure that an options-aware receiver that does not implement it would discard the packet.
> >> An options-aware receiver that does understand the option would, after successful reassembly, check that to see if the UAPC is correct and would discard the packet if it is not.
> >>
> >> This would somewhat expand the usage of UNSAFE from "options that modify the user data" to "options that must be understood in order to process the user data as intended." In my view (which I know is not universal) this expansion is likely necessary to cover use cases that will actually arise; the proposed protocol number in draft-daiya-tsvwg-udp-options-protocol-number seems to me to be one such use case.
> >>
> >> Mike Heard
> >>
> >>
> >
>