Re: [arch-d] I-D Action: draft-iab-protocol-maintenance-08.txt

"Bless, Roland (TM)" <roland.bless@kit.edu> Fri, 15 July 2022 09:30 UTC

Return-Path: <roland.bless@kit.edu>
X-Original-To: architecture-discuss@ietfa.amsl.com
Delivered-To: architecture-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 82B0FC18871F for <architecture-discuss@ietfa.amsl.com>; Fri, 15 Jul 2022 02:30:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.906
X-Spam-Level:
X-Spam-Status: No, score=-1.906 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, GB_SUMOF=5, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_HI=-5, 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
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 osKbTYydcjaP for <architecture-discuss@ietfa.amsl.com>; Fri, 15 Jul 2022 02:30:45 -0700 (PDT)
Received: from iramx1.ira.uni-karlsruhe.de (iramx1.ira.uni-karlsruhe.de [IPv6:2a00:1398:2::10:80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5896CC188719 for <architecture-discuss@ietf.org>; Fri, 15 Jul 2022 02:30:44 -0700 (PDT)
Received: from [2a00:1398:2:4006:ac9a:4147:855e:ea65] (helo=i72vorta.tm.kit.edu) by iramx1.ira.uni-karlsruhe.de with esmtpsa port 25 iface 2a00:1398:2::10:8 id 1oCHec-0004Dl-CK; Fri, 15 Jul 2022 11:30:34 +0200
Received: from [IPV6:::1] (ip6-localhost [IPv6:::1]) by i72vorta.tm.kit.edu (Postfix) with ESMTPS id 43CF9D00007; Fri, 15 Jul 2022 11:30:34 +0200 (CEST)
Content-Type: multipart/alternative; boundary="------------9fUNZFpVIlTBggfVOJLYwNK6"
Message-ID: <b0f4ad05-e936-d3ba-4952-8ba638bae031@kit.edu>
Date: Fri, 15 Jul 2022 11:30:34 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0
Content-Language: en-US
To: Eric Rescorla <ekr@rtfm.com>, Brian E Carpenter <brian.e.carpenter@gmail.com>
Cc: "iab@iab.org IAB" <iab@iab.org>, architecture-discuss@ietf.org
References: <165757861882.5604.10456894596583178055@ietfa.amsl.com> <482ad0ea-a64d-5156-445e-9a00ff2a7103@gmail.com> <CABcZeBPPL7a-0RdczMvDUmjwfRRd7qnBb=8nRJQ7Ni4oDJNSJg@mail.gmail.com>
From: "Bless, Roland (TM)" <roland.bless@kit.edu>
Organization: Institute of Telematics, Karlsruhe Institute of Technology (KIT)
In-Reply-To: <CABcZeBPPL7a-0RdczMvDUmjwfRRd7qnBb=8nRJQ7Ni4oDJNSJg@mail.gmail.com>
X-ATIS-AV: ClamAV (iramx1.ira.uni-karlsruhe.de)
X-ATIS-Checksum: v3zoCAcc32ckk
X-ATIS-Timestamp: iramx1.ira.uni-karlsruhe.de esmtpsa 1657877434.440712816
Archived-At: <https://mailarchive.ietf.org/arch/msg/architecture-discuss/uNz7Ray-5QasR-Ys3Sg4gPkvOsA>
Subject: Re: [arch-d] I-D Action: draft-iab-protocol-maintenance-08.txt
X-BeenThere: architecture-discuss@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: open discussion forum for long/wide-range architectural issues <architecture-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/architecture-discuss>, <mailto:architecture-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/architecture-discuss/>
List-Post: <mailto:architecture-discuss@ietf.org>
List-Help: <mailto:architecture-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/architecture-discuss>, <mailto:architecture-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Jul 2022 09:30:49 -0000

Hi Eric,

see inline.

On 15.07.22 at 02:46 Eric Rescorla wrote:
> Suppose we have a protocol that consists of a set of tag-length-values
> fields. A message consists of a length field followed by a list of
> TLVs.  The protocol defines the following requirements for how a
> message is constructed:
>
> 1. A given tag MUST only appear once
> 2. TLVs MUST appear in ascending tag order (this can help
>    detect violations of the previous condition)
>
> Question 1: How should implementations behave upon receiving the
> following messages, absent any other spec guidance?
>
> - Tags: 1, 2, 2  [Violates rule 1]
> - Tags: 1, 3, 2  [Violates rule 2]
>
Obviously, the sender violated the spec and thus did not apply
the conservative/strict sending rule of the Robustness Principle.
Depending on the rest of the protocol spec, one could either return
meaningful error messages (if defined and applicable for such cases)
or silently discard these malformed messages. I would probably
recommend to silently discard in order to avoid amplification attacks
(but this depends on the ratio of the message lengths).

I think the Robustness Principle on the receiver side is more about
cases when the overall length field does not match the sum of the TLV 
objects
lengths and/or individual TLV length fields extending beyond the end of the
message. An implementation should robustly handle these kinds of issues
(among many others). But how should implementations react to messages
where only one TLV is malformed? Should one drop the complete message
or process the rest of the message normally? This probably also depends
on the context (e.g., is the TLV optional or necessary etc.). Ideally, 
the spec
should also give guidance here.

> Question 2: Should we provide specification guidance for how to handle
> these rule violations, and if so, how?

IMHO, the protocol spec should give guidance for handling such
"malformed" messages to avoid the ambiguity of sending error messages
back or silently discard the messages (and probably log the error locally).

> Question 3: Do you think the answers depend on other properties of the
> protocol? If so, what are they?
>
See above. I don't think that the Robustness Principle is required
to define a useful reaction. Whether it is useful to send error messages
back may actually depend on the message type and context etc.

Regards,
  Roland


> On Tue, Jul 12, 2022 at 4:44 PM Brian E Carpenter 
> <brian.e.carpenter@gmail.com> wrote:
>
>     I still find it hard to accept that there is community consensus for
>     this document as it stands. Most of what its says is correct but it
>     still seems to unreasonably claim universal scope.
>
>     Some suggestions:
>
>     Title: The Robustness Principle May Have Harmful Consequences
>
>     Last sentence of Abstract:
>     For some types of protocol that are actively maintained, the
>     robustness principle can, and should, be avoided.
>
>     And a few changes in the main text such as:
>     OLD:
>     Time and experience shows that negative consequences to
>     interoperability accumulate over time if implementations apply the
>     robustness principle.
>
>     NEW:
>     Time and experience shows that negative consequences to
>     interoperability sometimes accumulate over time if implementations
>     apply the robustness principle.
>
>     Even with changes like this, I'm not sure everyone will agree.
>
>     Regards
>         Brian Carpenter
>
>     On 12-Jul-22 10:30, internet-drafts@ietf.org wrote:
>     >
>     > A New Internet-Draft is available from the on-line
>     Internet-Drafts directories.
>     > This draft is a work item of the Internet Architecture Board
>     IETF of the IETF.
>     >
>     >          Title           : The Harmful Consequences of the
>     Robustness Principle
>     >          Authors         : Martin Thomson
>     >                            David Schinazi
>     >    Filename        : draft-iab-protocol-maintenance-08.txt
>     >    Pages           : 15
>     >    Date            : 2022-07-11
>     >
>     > Abstract:
>     >     The robustness principle, often phrased as "be conservative
>     in what
>     >     you send, and liberal in what you accept", has long guided
>     the design
>     >     and implementation of Internet protocols.  The posture this
>     statement
>     >     advocates promotes interoperability in the short term, but can
>     >     negatively affect the protocol ecosystem over time. For a
>     protocol
>     >     that is actively maintained, the robustness principle can, and
>     >     should, be avoided.
>     >
>     >
>     > The IETF datatracker status page for this draft is:
>     > https://datatracker.ietf.org/doc/draft-iab-protocol-maintenance/
>     >
>     > There is also an HTML version available at:
>     >
>     https://www.ietf.org/archive/id/draft-iab-protocol-maintenance-08.html
>     >
>     > A diff from the previous version is available at:
>     > https://www.ietf.org/rfcdiff?url2=draft-iab-protocol-maintenance-08
>     >
>     >
>     > Internet-Drafts are also available by rsync at
>     rsync.ietf.org::internet-drafts
>     >
>     > 
>