Re: [ippm] Benjamin Kaduk's Discuss on draft-ietf-ippm-stamp-option-tlv-07: (with DISCUSS and COMMENT)

Benjamin Kaduk <kaduk@mit.edu> Fri, 17 July 2020 02:48 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: ippm@ietfa.amsl.com
Delivered-To: ippm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 27A313A0F9C; Thu, 16 Jul 2020 19:48:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.919
X-Spam-Level:
X-Spam-Status: No, score=-1.919 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 ghiC9ev-Ux_u; Thu, 16 Jul 2020 19:48:32 -0700 (PDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 0FA063A0F9A; Thu, 16 Jul 2020 19:48:31 -0700 (PDT)
Received: from kduck.mit.edu ([24.16.140.251]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 06H2m5tV021785 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Jul 2020 22:48:07 -0400
Date: Thu, 16 Jul 2020 19:48:04 -0700
From: Benjamin Kaduk <kaduk@mit.edu>
To: Greg Mirsky <gregimirsky@gmail.com>
Cc: The IESG <iesg@ietf.org>, draft-ietf-ippm-stamp-option-tlv@ietf.org, IPPM Chairs <ippm-chairs@ietf.org>, IETF IPPM WG <ippm@ietf.org>, Yali Wang <wangyali11@huawei.com>
Message-ID: <20200717024804.GI41010@kduck.mit.edu>
References: <159478020257.22868.5345083656365195833@ietfa.amsl.com> <CA+RyBmU36ktt4OV12J5Y6JKkEhsJ_HMvnvRKe=cLSemBpY+1Qw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CA+RyBmU36ktt4OV12J5Y6JKkEhsJ_HMvnvRKe=cLSemBpY+1Qw@mail.gmail.com>
User-Agent: Mutt/1.12.1 (2019-06-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ippm/WmgfZa8ImAllCXWWdz0bLRJNclQ>
Subject: Re: [ippm] Benjamin Kaduk's Discuss on draft-ietf-ippm-stamp-option-tlv-07: (with DISCUSS and COMMENT)
X-BeenThere: ippm@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF IP Performance Metrics Working Group <ippm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ippm>, <mailto:ippm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ippm/>
List-Post: <mailto:ippm@ietf.org>
List-Help: <mailto:ippm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ippm>, <mailto:ippm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Jul 2020 02:48:35 -0000

Hi Greg,

On Thu, Jul 16, 2020 at 05:38:08PM -0700, Greg Mirsky wrote:
> Hi Benjamin,
> thank you for your thorough review and insightful comments (and DISCUSSes,
> of course).
> I hope it will be okay if I start with addressing DISCUSSes and split
> comments resolution into a separate thread(s).

Of course!

> Hence, I've added my answers and notes in-line under tag GIM>>.
> 
> Regards,
> Greg
> 
> On Tue, Jul 14, 2020 at 7:30 PM Benjamin Kaduk via Datatracker <
> noreply@ietf.org> wrote:
> 
> > Benjamin Kaduk has entered the following ballot position for
> > draft-ietf-ippm-stamp-option-tlv-07: Discuss
> >
> > When responding, please keep the subject line intact and reply to all
> > email addresses included in the To and CC lines. (Feel free to cut this
> > introductory paragraph, however.)
> >
> >
> > Please refer to https://www.ietf.org/iesg/statement/discuss-criteria.html
> > for more information about IESG DISCUSS and COMMENT positions.
> >
> >
> > The document, along with other ballot positions, can be found here:
> > https://datatracker.ietf.org/doc/draft-ietf-ippm-stamp-option-tlv/
> >
> >
> >
> > ----------------------------------------------------------------------
> > DISCUSS:
> > ----------------------------------------------------------------------
> >
> > I support Roman's discusses and am happy to see the ongoing discussion
> > thereof.
> >
> > (1) I think there's a conflict between this document and RFC 8762 with
> > respect to the behavior of pure RFC 8762 implementations that receive
> > packets longer than the base packet for the given operational mode.
> >
> > RFC 8762 says (Section 4.3):
> >
> > % The Session-Reflector receives the STAMP-Test packet and verifies it. If
> > % the base STAMP-Test packet is validated, the Session-Reflector that
> > % supports this specification prepares and transmits the reflected test
> > % packet symmetric to the packet received from the Session-Sender copying
> > % the content beyond the size of the base STAMP packet (see Section 4.2).
> >
> > But Section 4 of this document says:
> >
> >                                                    A Session-Reflector
> >    that does not support STAMP extensions is not expected to compare the
> >    value in the Length field of the UDP header and the length of the
> >    STAMP base packet.  Hence the Session-Reflector will transmit the
> >    base STAMP packet.  [...]
> >
> > Does "will transmit the base STAMP packet" mean something other than
> > "with the exact length of the base packet [for the given operational
> > mode]"?
> >
> GIM>> Thank you for pointing out the text in RFC 8672. I agree that text in
> the draft requires re-work. Would the following update make it consistent
> with RFC 8762 (I will accept your suggestion to change the use of the U
> flag so that the Session-Sender sets it to 1 on the transmission. Thus if
> the Session-Sender receives a TLV flag set to 1 in the reflected packet it
> MUST skip the TLV):
> OLD TEXT:
>    A Session-Reflector
>    that does not support STAMP extensions is not expected to compare the
>    value in the Length field of the UDP header and the length of the
>    STAMP base packet.  Hence the Session-Reflector will transmit the
>    base STAMP packet.  It is the local policy on the Session-Sender
>    (similar to the handling of SSID == 0 scenario described in
>    Section 3) that will control the sender's behavior.
> NEW TEXT:
>    A Session-Reflector
>    that does not support STAMP extensions will not process but copy them
>    into the reflected packet, as defined in Section 4.3 [RFC8762].  The
>    Session-Sender receives unprocessed TLV indicated by the U flag being
>    set to 1.

This should make us consistent with RFC 8762, yes.  I think it might be
worth reminding the reader that the Session-Sender will know if it is
talking to a Session-Reflector that does not support STAMP extensions,
because such Session-Reflectors will send a zeroed SSID, though I guess
that behavior is already mentioned a couple sentences later, so maybe it
would be redundant here.

I'd suggest rewording the last sentence (of the new text) to someething
like "a Session-Sender that supports TLVs will indicate specific TLVs that
it did not process by setting the U flag to 1 in those TLVs", to help
reinforce that the U flag will only be set by a Session-Reflector that
supports extensions/this document at all.

> >
> > (2) As I remarked on (then-) draft-ietf-ippm-stamp, I think we need to
> > require some level of cryptographic protection whenever control
> > information is included in a Session-Sender's test packet.  That is,
> > that a Session-Reflector MUST NOT act on control information received in
> > unauthenticated packets, and specifically, that the HMAC TLV must be
> > used, since the base authenticated STAMP packet's HMAC does not cover
> > the options.
> >
> GIM>> The use of the HMAC TLV is required in the authenticated mode STAMP:
>    The keyed Hashed
>    Message Authentication Code (HMAC) TLV MUST be included in a STAMP
>    test packet in the authenticated mode, excluding the case where the
>    only TLV present is the Extra Padding TLV.
> We can require that in unauthenticated STAMP mode some TLVs be accompanied
> by the HMAC TLV. Would mitigate the exposure of the Session-Reflector?
> Which TLVs, in your opinion, require such a requirement?

I think the idea was to require the HMAC TLV to accompany those TLVs that
represent "control information", yes.  My initial read of the document
(reflected in my longer comments) says that the Location and Timestamp
Information TLVs would be considered to contain such "control information",
though on reread perhaps the Timestamp Information is not always considered
sensitive.  I'm on the fence about Location, and I think that Class of
Service is pretty clearly on the "control information" side of things
(since it affects the headers of the containing IP packet and consequently
the behavior of the network).

> >
> > (3) The secdir reviewer's question about dealing with 6-to-4 gateways
> > seems to have not gotten a response.  Specifically, the requirement that
> > "[t]he Session-Reflector MUST validate the Length value against the
> > address family of the transport encapsulating the STAMP test packet"
> > seems to require the protocol to fail when sender and reflector use
> > different address families, or perhaps to require the sender to use
> > trial and error to determine which address family is used by the
> > reflector.  Some clarification on the intended operation in such
> > scenarios seems appropriate.
> >
> GIM>> I've misunderstood the question and thank you for clarifying the
> scenario. I now see that IP addresses in the Location TLV must allow
> explicit signaling of the address family while providing space for IPv6.
> So, we introduce sub-TLVs and a new sub-registry for IANA. Does that sound
> reasonable? I'll work on details if you agree with the proposed approach.

That sounds like it would work.

> >
> > (4) The ability for a Session-Sender to (MUST-level!) control the DSCP
> > codepoint used by packets generated by a Session-Reflector feels like it
> > opens up significant risk in site-local (security-relevant) policy.  That
> > is, the interpretation of the DSCP codepoints is to large extent
> > site-specific, and allowing a nominally external system to set any/all
> > possible values, without a chance for site policy to be applied and
> > block the use of potentially disruptive DSCP values.  So I think we need
> > to modify the "MUST set", perhaps requiring that either the requested
> > DSCP value is used or the entire TLV/packet/whatever is rejected.
> >
> GIM>> Perhaps we can add a note in the security section that an
> implementation must control the support of each TLV. In other words, a
> particular TLV can be disabled for the given test session. Alternatively,
> the CoS TLV might require the use of the HMAC TLV. I think that the first
> option is sufficient. What do you think? Or would you suggest an entirely
> different approach?

I think my previous replies here combine to say that use of the CoS TLV
should require ues of the HMAC TLV, but I think it's also good to let an
implementation control the support for each TLV as you propose.  My
intuition is still saying that a separate local policy filter should be
available, though -- just because the peer is authenticated does not
inherently grant them privilege to set arbitrary DSCP values.  In some
sense this is the classic distinction between authentication and
authorization.  In some networks, setting some DSCP values might require
more privilege than setting other such values, and the simple
"authenticated or not" knob provided by the HMAC TLV doesn't allow us to
express that distinction.  (I'm thinking about scenarios where setting a
particular DSCP value privileges the enclosed packet to such a degree that
other traffic on the network suffers significantly as a result -- a "drop
everything and move this packet!" bit, if you will.)

> >
> > (5) If we're not going to remedy the severability of authenticated
> > options from authenticated base packets (which would be my preferred
> > resolution), we need to document that weakness in the security
> > considerations.
> >
> GIM>> I think that the document does require HMAC TLV is used in the
> authenticated mode.  Please see my comments to DISCUSS #2. Would you agree?

I think my point didn't make it through properly, sorry.

The issue is not that we need to authenticate both the "base part" and the
"extensions part", but rather that we need a way to say that "base part of
packet 1" and "extensions part of packet 1" go together.  Right now, with
two separate HMACs, the Session-Reflector would happily process a packet
that has "base part of packet 1" and "extensions part of packet 2" and not
even notice that anything was wrong.  (A similar thing could be done to
responses processed at the Session-Sender, of course.)  That is, I can
freely "mix and match" authenticated base parts and authenticated
extensions parts (as an on-path attacker).  Including as input to one of
the HMAC calls a unique value from the other part of the packet will be
enough to tie the two together, and let the recipient detect the
modification.  The most promising candidates for such a "unique per-packet
value" would be the HMAC output itself and the packet sequence number.
Using the HMAC value itself is a more robust cryptographic construction (in
that it authenticates the entire other part by reference), but I suspect
that we'll have to use the sequence number due to implementation
(performance) concerns -- needing to wait for the first HMAC before
extensions can be finalized seems like it would introduce unwanted delay in
the timestamping.  Assuming that implementations actually check the
sequence number for repeats, that should still provide enough protection.

Thanks,

Ben

> >
> >
> > ----------------------------------------------------------------------
> > COMMENT:
> > ----------------------------------------------------------------------
> >
> > (side note) It seems slightly gratuitous to group the "base" (with
> > SSID) packet formats by authenticated/unauthenticated and then by
> > sender/reflector, when RFC 8762 groups by sender/reflector and then by
> > authenticated/unauthenticated.  But probably not worth churning the
> > document at this point to address it...
> >
> > I support Erik Kline's discuss point about the L-bit error-case guidance
> > (and note that Section 4.7 also seems to be saying to zero specific
> > fields vs. the earlier guidance to echo the entire rest of the packet).
> >
> > Section 1
> >
> >    Simple Two-way Active Measurement Protocol (STAMP) [RFC8762] supports
> >    the use of optional extensions that use Type-Length-Value (TLV)
> >    encoding.  Such extensions enhance the STAMP base functions, such as
> >
> > How about a "this document specifies" in there somewhere?  TLVs are not
> > mentioned in RFC 8762...
> >
> > Section 3
> >
> >    An implementation of the STAMP Session-Reflector that supports this
> >    specification SHOULD identify a STAMP Session using the SSID in
> >    combination with elements of the usual 4-tuple for the session.
> >
> > It's slightly surprising that this is only a SHOULD.
> >
> >    A STAMP Session-Reflector that does not support this specification
> >    will return the zeroed SSID field in the reflected STAMP test packet.
> >    The Session-Sender MAY stop the session if it receives a zeroed SSID
> >    field.  An implementation of a Session-Sender MUST support control of
> >    its behavior in such a scenario.  [...]
> >
> > This feels like it's somewhat misaligned, in that the MAY would indicate
> > that the choice is at the implementation's discretion, but the MUST
> > indicates that it's at the operator's discretion.
> >
> >
> > Should the TLVs field be included in Figures 3 and 4 (as it is in
> > Figures 1 and 2)?
> >
> > Section 4
> >
> >    optional field in the STAMP test packet.  Multiple TLVs MAY be placed
> >    in a STAMP test packet.  A TLV MAY be enclosed in a TLV.  TLVs have a
> >
> > Would it be appropriate to instead say something like "Additional TLVs
> > may be enclosed within a given TLV, subject to the semantics of the
> > (outer) TLV in question"?
> >
> >    The format of the STAMP TLV Flags displayed in Figure 6 and the
> >    location of flags is according to Section 5.2.
> >
> > (side note): it's often nice to give a short "mnemonic" expansion for
> > the bit names, to help people remember what they do.  E.g., 'U' could be
> > "unimplemented" (or "unrecognized"), 'A' could be "authentic", etc.
> > (assuming that the boolean sense of the interpretation makes sense, of
> > course).  ('L' confuses me a bit, as "length-error" is not quite a
> > generic enough description to cover all flavors of malformed contents.)
> >
> >    o  U - a one-bit flag.  A Session-Sender MUST set the U flag to 0
> >       before transmitting an extended STAMP test packet.  A Session-
> >       Reflector MUST set the U flag to 1 if the Session-Reflector has
> >       not understood the TLV.
> >
> > This seems kind of problematic, in that the Session-Sender can only rely
> > on this ("set to 1") behavior if it already knows as a precondition that
> > the Session-Reflector supports this document.  (IIUC, a pure RFC 8762
> > Session-Reflector would just blindly copy any part of the packet after
> > the base format into the reflected packet, i.e., leave the bit set at
> > zero.)  Wouldn't it be more robust if the semantics were to set the bit
> > to 1 if it actively was understood?  (Yes, this would require a more
> > complicated specification for recipient behavior when the U flag is set,
> > since it would differ between Sender and Reflector, but that seems
> > easier to control for than lack of robustness in the face of mixed
> > deployment.)
> >
> > Section 4.1
> >
> >    o  Extra Padding - a pseudo-random sequence of bits.  The field MAY
> >       be filled with all zeros.
> >
> > "All zeros" is not a "pseudo-random sequence of bits".  I suggest
> > "typically, a pseudo-random sequence of bits" instead.
> >
> > Section 4.2
> >
> >    STAMP Session-Senders MAY include the Location TLV to request
> >    information from the Session-Reflector.  The Session-Sender SHOULD
> >    NOT fill any information fields except for STAMP TLV Flags, Type, and
> >    Length.  [...]
> >
> > Just to check: "NOT fill any information" means "set all bits to zero",
> > right?
> >
> > Also, to check: this "to request information" implies that this is
> > "optional control information" that, per my Discuss point, "MUST NOT be
> > acted on unless authenticated"?  So, we would want to (in addition to my
> > previous point) say that the fields would be set to all zeros in the
> > reflected packet if the initial packet was unauthenticated.
> >
> >    packet.  If the Length field's value is invalid, the Session-
> >    Reflector MUST zero all fields and MUST NOT return any information to
> >    the Session-Sender.  The Session-Reflector MUST ignore all other
> >    fields of the received Location TLV.
> >
> > nit(?): Grammatically, framing these requirements as standalone
> > sentences seems to imply that they are independent requirements that
> > apply separately.  That, in turn, would say that the Session-Reflector
> > MUST ignore everything but the Length, always, which is of course absurd
> > ... but it might be worth clarifying that this requirement is also
> > conditional on an invalid Length field.
> >
> >    o  Source MAC - 6-octet-long field.  The Session-Reflector MUST copy
> >       the Source MAC of the received STAMP packet into this field.
> >
> > (nit) In my mind, a bare "MAC" here evaluates to Message Authentication
> > Code, i.e., the authorization HMAC, which is of course 16 octets, not 6.
> > So I suggest including the word "Address" to disambiguate.
> >
> >    o  Destination IP Address - IPv4 or IPv6 destination address of the
> >       packet received by the STAMP Session-Reflector.
> >    [...]
> >
> > (side note): I note that at least in 2008, there were deployed NATs that
> > rewrote binary payloads containing the NAT's public IP address,
> > necessitating the creation of the XOR-MAPPED-ADDRESS attribute to
> > successfully convey the un-NAT-mangled address to the peer
> > (https://tools.ietf.org/html/rfc5389#section-15.2).  Depending on how
> > reliable the address information (source or destination) needs to be for
> > STAMP, this may be a relevant consideration.
> >
> >    ports will indicate if there is a NAT router on the path.  It allows
> >    the Session-Sender to identify the IP address of the Session-
> >    Reflector behind the NAT, and detect changes in the NAT mapping that
> >    could cause sending the STAMP packets to the wrong Session-Reflector.
> >
> > How does this allow the Session-Sender to detect changes in the NAT
> > mapping that would cause this?   Wouldn't a change in the NAT mapping
> > that sends packets to the wrong Session-Reflector result in a failure to
> > look up the session on the Reflector and a lack of any reflected packets
> > coming back to the Session-Sender?
> >
> > Section 4.3
> >
> > Is just the granularity of "NTP" or "PTP" as time synchronization
> > information sufficient to be useful?  Is the assumption that one would
> > then go and query, via a different mechanism, (e.g.) what stratum of NTP
> > source is used, etc.?
> >
> >    The STAMP Session-Sender MAY include the Timestamp Information TLV to
> >    request information from the Session-Reflector.  The Session-Sender
> >
> > [ditto re "optional control information" and authentication]
> >
> >    SHOULD NOT fill any information fields except for STAMP TLV Flags,
> >    Type, and Length.  The Session-Reflector MUST validate the Length
> >
> > [ditto re "NOT fill in"]
> >
> >    value of the TLV.  If the value of the Length field is invalid, the
> >
> > I know that we expect the Session-Reflector to have relatively little
> > logic, but the Session-Sender should probably still behave defensively
> > and also do this kind of validation (not just here; throughout the
> > document) in case it receives attacker-supplied input.
> >
> > Section 4.4
> >
> > Could we get some more guidance on how the Session-Sender should set all
> > these fields, specifically the DSCP2 that is "the received value in the
> > DSCP field at the Session-Reflector in the forward direction", that in
> > general the sender cannot know at the time it constructs the packet?
> >
> >    drops for lower service packets are at a normal level.  Using a CoS
> >    TLV in STAMP testing helps to troubleshoot the existing problem and
> >    also verify whether DiffServ policies are processing CoS as required
> >    by the configuration.
> >
> > It's not immediately obvious to me how we get from "using a CoS TLV in
> > STAMP" to "verify whether DiffServ policies are processing CoS as
> > required by the configuration", though I'm willing to believe it's the
> > case.
> >
> > Section 4.5
> >
> > While I can perhaps accept that the specifics of "in-profile" are going
> > to be site-specific, I would greatly appreciate some greater clarity on
> > what type of thing it's supposed to be doing and at what scope (in time
> > and, e.g., STAMP session) it is going to be defined/configured.
> >
> >    test packet.  The Session-Sender MUST zero the R_RxC and R_TxC fields
> >    before the transmission of the STAMP test packet.  If the received
> >
> > (This is redundant with the per-field definitions.)
> >
> > Section 4.6
> >
> >    o  ID (Access ID) - four-bit-long field that identifies the access
> >       network, e.g., 3GPP (Radio Access Technologies specified by 3GPP)
> >       or Non-3GPP (accesses that are not specified by 3GPP) [TS23501].
> >
> > Does the [TS23501] reference really apply to the "Non-3GPP" case
> > (whether or not in addition to the 3GPP case)?
> >
> >       The value is one of those listed below:
> >
> >       *  1 - 3GPP Network
> >
> >       *  2 - Non-3GPP Network
> >
> >       All other values are invalid and the TLV that contains it MUST be
> >       discarded.
> >
> > So there's no interest in future expansion here or need for a registry?
> >
> >    three seconds.  An implementation MUST provide control of the
> >    retransmission timer value and the number of retransmissions.
> >
> > Is the retransmission timer defined to have a fixed value (i.e., no
> > back-off)?
> >
> > Is the retransmission a blind retransmission, i.e., using the original
> > Return Code even if local conditions have changed?
> >
> > Section 4.7
> >
> >    in the reflected packet.  If the Session-Reflector is in stateless
> >    mode (defined in Section 4.2 [RFC8762]), it MUST zero the Sequence
> >
> > Looks like this definition is just in the toplevel Section 4 of RFC 8762.
> >
> >    o  Follow-up Timestamp - eight-octet-long field, with the format
> >       indicated by the Z flag of the Error Estimate field of the packet
> >       transmitted by a Session-Reflector, as described in Section 4.1
> >       [RFC8762].  It carries the timestamp when the reflected packet
> >       with the specified sequence number was sent.
> >
> > We should probably be extremely clear on whether this is the Z flag of
> > the current/containing packet or the one indicated by the Sequence
> > Number field.
> >
> > Section 4.8
> >
> > (I'm happy to see the discussion with Roman about the key-management and
> > algorithm-agility questions, noting that we have BCPs 107 and 201 to
> > give guidance for those cases, respectively.)
> >
> >    The STAMP authenticated mode protects the integrity of data collected
> >    in the STAMP base packet.  STAMP extensions are designed to provide
> >    valuable information about the condition of a network, and protecting
> >    the integrity of that data is also essential.  The keyed Hashed
> >    Message Authentication Code (HMAC) TLV MUST be included in a STAMP
> >    test packet in the authenticated mode, excluding when the only TLV
> >    present is Extra Padding TLV.  The HMAC TLV MUST follow all TLVs
> >
> > (editorial?) I think I can convince myself to read this with two different
> > causalities -- either the HMAC TLV is only allowed to appear in
> > authenticated-mode packets (but can also appear in unauthenticated-mode
> > packets where the only other TLV is the Extra Padding TLV); or in the
> > case when you are sending [this-document] packets in authenticated mode,
> > you MUST also have an HMAC TLV, unless you're sending unauthenticated
> > extended packets where the only TLV present is the Extra Padding TLV.
> > The first interpretation doesn't really make much sense, and the second
> > one is pretty consistent with the follow-up note about "HMAC TLV MAY be
> > used [...] in unauthenticated mode".  But I would still suggest
> > rewording for clarity, perhpas "all authenticated STAMP packets
> > compatible with this specification MUST additionally authenticate the
> > option TLVs by including the HMAC TLV, with the sole exception of when
> > there is only one TLV present and it is the Extended Padding TLV".
> >
> >    fully applicable to the use of the HMAC TLV.  HMAC is calculated as
> >    defined in [RFC2104] over text as the concatenation of all preceding
> >    TLVs.  [...]
> >
> > As the secdir reviewer noted, this makes the options severable from the
> > base packet (and separately replayable, the "mix and match" nature).
> > >From a cryptographic point of view it's much preferred to include at
> > least some of the base packet (ideally all, though that of course makes
> > precise egress timestamping hard) as HMAC input, to bind the two
> > together.  Even including just the sequence number(s) would be a big
> > win.
> >
> >    packet.  The Session-Reflector MUST copy the remainder of the
> >    extended STAMP test packet into the reflected packet.  The Session-
> >    Reflector MUST set the A flag in the copy of the HMAC TLV in the
> >    reflected packet to 1 before transmitting the reflected test packet.
> >
> > This phrasing is a bit weird -- is "the remainder" of the packet all the
> > other TLVs, or just the stuff after the HMAC TLV?  We're supposed to
> > process HMAC first, after all, but that's only partially clear from the
> > rest of the section/document...
> >
> > Section 5.1
> >
> >    This document defines the following new values in the STAMP Extension
> >    TLV range of the STAMP TLV Type registry:
> >
> > This appears to be the only instance of "STAMP Extension TLV range" in
> > the document; is this perhaps meant to refer to the "IETF Review" or
> > 1-175 range?
> >
> > Section 5.4
> >
> > Do we feel a need to provide any kind of definition for "HW Assist", "SW
> > local", and/or "Control plane"?
> >
> > Section 6
> >
> > This would be a fine place to reiterate that both Sender and Reflector
> > should have parsers written defensively to protect against malformed
> > (i.e., bad TLV length) input); as I noted previously, the current text
> > really only suggests that the reflector should do so, but the sender is
> > not immune.
> >
> > If we leave the U-flag semantics unchanged, we also need to document the
> > potential ambiguity between a reflector that blindly reflects the whole
> > message and one that actually understands all the received TLVs.
> >
> > There's also some interesting considerations about the state of the 'A'
> > bit not itself being covered by the response's HMAC TLV (if it is only
> > set in the HMAC TLV vs. all TLVs).  I would strongly recommend having
> > Section 4.8 require that the A flag be set in *all* TLVs if
> > authentication fails, so that this information is covered by the
> > response's HMAC TLV.  (In the degenerate case of only an HMAC TLV it's
> > still unprotected, but the HMAC itself is over the empty message in that
> > case so it's not terribly interesting to mess with.)  Also, the
> > definition of the A flag in Section 4 could probably be tightened up,
> > whichever way we land on this point -- right now it suggests that it
> > might be set on more than just the HMAC TLV but is not very clear.
> > (Interestingly, later on in Section 4 we do seem to say that you have to
> > *check* the A flag in every TLV.)
> >
> > We might also consider referencing RFC 2474 for the DSCP security
> > considerations.
> >
> > Section 9.1
> >
> > It's not entirely clear that RFC 5357 needs to be normative; we say we
> > can be compatible with lite-mode and that the extended padding is
> > similar, but those are just facts and you don't need to know anything
> > from 5357 to implement this document.
> >
> > Similarly, I'm not sure why [TS23501] is listed as normative.
> >
> > Section 9.2
> >
> > On the other hand, you do actually need to read RFC 2104 to implement
> > the HMAC TLV, which makes it a normative reference (similarly for 4868)!
> >
> >
> >
> >