Re: [core] AD review of draft-ietf-core-echo-request-tag-10

Göran Selander <goran.selander@ericsson.com> Thu, 10 September 2020 09:46 UTC

Return-Path: <goran.selander@ericsson.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 19EB43A1197; Thu, 10 Sep 2020 02:46:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.102
X-Spam-Level:
X-Spam-Status: No, score=-2.102 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-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=ericsson.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 c8hx1tq9xxBJ; Thu, 10 Sep 2020 02:46:53 -0700 (PDT)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60068.outbound.protection.outlook.com [40.107.6.68]) (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 42BBB3A119A; Thu, 10 Sep 2020 02:46:53 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G7JUi5Z6SDNIDdc1Nvhk89RdlEV7wYsg/YF8tH620Pnovyr+JLdXs/OJgMtKEzEf5vH5vWlKt1LD4J6c2pm7zhxqmKbmzWRB9yNWpe0RcV7hUJ1iZrZBoF1emWqKzBM6mpcGYfdMHJi9yQ+cbDbfuLxB8CxEfMqdyfVNaUP3UKcG3KS5Z6MD0h/O16k31uoVC9WV4ya5erHnDQAcGspgGBjHqNVRo1qrLF1CsdTneyahQw6aDAuRFfZu052NF8s2NyLYy0s3CESlArryUzX85p517mP81tj953sOye0af+SNVZB1PkVBNP1M9t9mN+uaBaLkRFYTICo8tUVs6vRngQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=66m1LyXHxU3UIXDc6re55pZCLlbr8ljFuLvUcXjxiYU=; b=aiu91y6kh3lXhtt6rO2esBlrx0aVnRJ+ScabS1gCggicJnI0H4gXGfXp0AFbsE7KRtZCbsEScjXlIwz3mbqZ8DL/cmWqe/gOorn8lfiSCDdEtjpqh6zdbIuyiBR1JduFpxPZT13/Za/vg+Ne0HlaIE5icz6atsI97Rj1FibRfw2/pHsOWtQhwnhQ4iowtLfVhCIvcSuPvSG9OQbZ+cOna+xoC3EwwemSVil+5Xu40EoqBmnED+UPUhsLVIYMFI9R4TBjIVnsv1QK24MuzByeHuvaGEOYeXJB/AUdTioh7+pYRse4gbaG6EJhvhIPr4Va3vN7dRDgS+z23Dz8Xt9emQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=66m1LyXHxU3UIXDc6re55pZCLlbr8ljFuLvUcXjxiYU=; b=elO9WGoMEiD3+TrbnD5oEjoaLilWLSj28WLeqVmxJ1xDmU3rAgUeX8DX8oV0IyFUqY/Fyhm/VY2fL8cmD1qOpyKfkAu5vaiRadrbO9wjZ/OpFdNTCZReHmNU5UsUsuEj8PNS7dBbhoyFKT3yrq2YMGfzO00A5hk8WHQ7ujxqfqo=
Received: from HE1PR0702MB3674.eurprd07.prod.outlook.com (2603:10a6:7:82::14) by HE1PR07MB4347.eurprd07.prod.outlook.com (2603:10a6:7:a3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.15; Thu, 10 Sep 2020 09:46:39 +0000
Received: from HE1PR0702MB3674.eurprd07.prod.outlook.com ([fe80::3168:e1aa:8f49:6de3]) by HE1PR0702MB3674.eurprd07.prod.outlook.com ([fe80::3168:e1aa:8f49:6de3%7]) with mapi id 15.20.3370.016; Thu, 10 Sep 2020 09:46:39 +0000
From: Göran Selander <goran.selander@ericsson.com>
To: Christian Amsüss <christian@amsuess.com>, Barry Leiba <barryleiba@computer.org>
CC: "draft-ietf-core-echo-request-tag.all@ietf.org" <draft-ietf-core-echo-request-tag.all@ietf.org>, "core@ietf.org" <core@ietf.org>
Thread-Topic: [core] AD review of draft-ietf-core-echo-request-tag-10
Thread-Index: AQHWag2783ig3eTTLEWqbjvVPkqoAKlYiEkAgAlzsoA=
Date: Thu, 10 Sep 2020 09:46:39 +0000
Message-ID: <791F308F-A64E-400B-BAC0-B5E45C633048@ericsson.com>
References: <CALaySJJt_U+qF_xwOtJC2BD=oet-stNxoJkMYJfH=Z8BmcLc3g@mail.gmail.com> <20200904112614.GA3682231@hephaistos.amsuess.com>
In-Reply-To: <20200904112614.GA3682231@hephaistos.amsuess.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.40.20081000
authentication-results: amsuess.com; dkim=none (message not signed) header.d=none;amsuess.com; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [83.251.145.232]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: b8855cc6-678b-4d50-956a-08d8556e6a91
x-ms-traffictypediagnostic: HE1PR07MB4347:
x-microsoft-antispam-prvs: <HE1PR07MB4347D66347C4A875B2253CD4F4270@HE1PR07MB4347.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:7691;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: AxgNh+Pzx5c0u73Bfx4flBwDCbpFYErYUNz+cxlJYZ7rdDUXDbunT7LNgk1KU8n/BBHlnzYSYkLRpJDGDQtyQOQgWLgyhF4XSV6LPrp3NjTIKJQHQOIV21iYEM+cvqycj4cKNclv5RSrXav761Zy7HklIKTGedYuiId4V0vBRivbsPbivqddHIujrKaipId4Wwba3WLJqMTd3Abxp6pMkGl9e+nrNfBjNrnRT5bwrKWwyIuCb1uGsfd5g7dw19K0TgPvVrjsMlzW53H0nvElxXhhT6OwL/JDAZQ2iLCEjW67pReU9uCWWO8zDXzTBeKuCEheP3xaK+BneMax+m8Qtngam9IFr4VjJG7khADzqfHpm5LzEDOZrgLMrToOfeHzoSEAKUNK5BB8mjztkDIDZtCoMxlQJmgPTV1uMfKOBkJGeErfymyhC1rZ5Oft2GhBcjnqsKUNq4+ua7H5cg/CdA==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0702MB3674.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(39860400002)(376002)(346002)(396003)(478600001)(54906003)(186003)(66556008)(85202003)(26005)(110136005)(33656002)(6486002)(6506007)(30864003)(76116006)(966005)(66946007)(8936002)(8676002)(4326008)(6512007)(66476007)(5660300002)(71200400001)(316002)(36756003)(66574015)(83380400001)(86362001)(2616005)(64756008)(85182001)(2906002)(66446008); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: Yp9mdO0zu7rPAyyoiFpgKHR2gQD8lN1iJ1mrXv1HYP46Cmc7ujdbHlxGcOCWsma11S66vOTFrTTJmGYIusMX1mtX5CsE29Vj+FgUO3HIliK6AeUXrtzX7+hyBMCgp295IggUgUXCwbqHcvXD/wtjDxDRbg1OdK191mhAdADF1975n1Ph7tnaHAHh4yRgbytHqCyq1/9NY0qWtIu5VSg4S5PtiTP6vbbki0Y66ryPl55hqwZx1GeykQGAs55i4B1Gz5QfUjtlLvtvMWadxCGZi9gOD4Ia672p3jUtB/UwpW+ClSwKcLIX+Yen0f6qrkodbhHt38jMwV9nLtou5UsLrGxPx0hzk4tE7LZ0EWFiOIto1R7duMtIf/FJSv5MEdrvHZvVZaTquS0D4Ig2TtynuDyBDiExk9X3mD3I2snkMvgGKFOzuOwCor9boxDsNicRRtdZG0oYJj+3CcHmCE6O3dL8iRBPhCnIcOI4TDZKk8b0vdhds0CmhqSMOfS2yq4taOMN+keS/T8aWcZHmQvJK4Eoc5AVObefzvHwpPR6/DZLeSgw+UDvdJkjwNr9fyqzWKBLMXGQ912gEGxkCeqbS6N+gygjkEYB6XUqKwe3JDfjcAtGt0dRrqVsrxm0/nRBRIqDKB61e2vVLsGoCoEqtA==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <0EA4C6B50B474F4C9088EAF16861812E@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: HE1PR0702MB3674.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: b8855cc6-678b-4d50-956a-08d8556e6a91
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Sep 2020 09:46:39.4954 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: FoDyIcJyZ+HsY24HOBzFd9u7DOUARR5EAVkwCA1E3724CyOUHSxhva0VYUXOnU2Bg/W5YxRze53hm5HVLWnvhch5+VkoGHi7c4IcG22owbI=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB4347
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/fFRf_6IrtedPM7dIED0LuB2rN3g>
Subject: Re: [core] AD review of draft-ietf-core-echo-request-tag-10
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Sep 2020 09:46:56 -0000

Hi Barry,

Here are responses to the two comments of your review which Christian redirected.

    Deferred to the other authors
    =============================

    >    Unless a counting Echo value is used, the Echo
    >    option value MUST contain 32 (pseudo-)random bits that are not
    >    predictable for any other party than the server, and SHOULD contain
    >    64 (pseudo-)random bits.
    > 
    > What’s the reason for not just using MUST for 64 bits and being done with
    > it?

    I'd suppose that it's to allow for applications with well controlled
    power cycles and Echo value changes to reduce their message sizes --
    Göran, could you say a bit more here?

[GS] The recommendation of 64 bits is motivated by the comparison with 64 bits MAC in the beginning of this paragraph, but the requirements of 32 bits depends on application so we replaced that with an application-dependent requirement to mitigate against reuse, see:
https://github.com/core-wg/echo-request-tag/pull/61/commits/d8ba0f5


    >    Servers MAY use the time since reboot measured in some unit of time.
    > 
    > For what?  It’s not clear to me what this refers to.

    John, Göran, could this be a leftover from the later changes around
    server / wall time?


[GS] This text is intended to be read in context of other text previously in this section. I tried to rephrase to make it more clear, see:
https://github.com/core-wg/echo-request-tag/pull/61/commits/4d3ca93


Both these commits are part of PR#61 which makes additional clarifications on Echo, the current changes are here:
https://github.com/core-wg/echo-request-tag/pull/61/files


Please let us know if you have any further comments.

Thanks,
Göran


On 2020-09-04, 13:26, "Christian Amsüss" <christian@amsuess.com> wrote:

    Hello Barry,

    thanks for all your comments.

    Some points went unhandled due to a very curious glitch that had your
    mail truncated mid-body when it went through the draft mail forwarder but not
    when it went through the list; here's addressing the tail, grouped by
    "done", "explained" and "better answered by Göran or John":

    Done
    =====

    > Nit: [various]

    Thanks, fixed.

    >    The Request-Tag option is repeatable because this easily allows
    >    stateless proxies to "chain" their origin address.  They can perform
    >    the steps of Section 3.5.3 without the need to create an option value
    >    that is the concatenation of the received option and their own value,
    >    and can simply add a new Request-Tag option unconditionally.
    > 
    > I don’t know what ‘“chain” their origin address’ means, and I don’t know
    > what ‘their own value’ means.  Can you clarify this?

    Yes that's hard to parse without the mindset I was in when writing it;
    replaced with

      [...] because this easily allows several cascaded stateless proxies to each put in an
      origin address.

    > — Section 3.8 —
    > 
    >    The threat model here is not an
    >    attacker (because the response is made sure to belong to the current
    >    request by the security layer), but blocks in the client's cache.
    > 
    > I don’t understand “The threat model is blocks in the client’s cache.”  I
    > think this needs some rewording to explain better what you mean.

    Clarified to:

      The threat model here does not depend on an attacker: a client can
      construct a wrong representation by assembling it from blocks from
      different resource states.  That can happen when a resource is
      modified during a transfer, or when some blocks are still valid in the
      client's cache.

    > — Section 4.1 —
    > 
    >    The wrong response may be an old response for the same
    >    resource or for a completely different resource
    > 
    > Are you referring to an old response for a completely different resource
    > (which is what this says as written), or to any response for a completely
    > different resource (which is what I think you mean)?  If the latter, it
    > should say, “...or a response for a completely different resource”.

    It does now.

    >    A straightforward mitigation is to mandate clients to not reuse
    >    Tokens until the traffic keys have been replaced.  One easy way to
    >    accomplish this is to implement the Token as a counter starting at
    >    zero for each new or rekeyed secure connection.
    > 
    > This is essentially repeated in the next section.  Can you avoid that,
    > probably by rewording this to say that the next section privides a
    > mitigation?

    That indeed sounds like the way to go for that paragraph (although we
    might just drop it as well); changed to:

      A straightforward mitigation is to mandate clients to not reuse
      Tokens until the traffic keys have been replaced. The following
      section formalizes that.

    > — Section 4.2 —
    > 
    >    One easy way to accomplish this is to implement the Token (or part of
    >    the Token) as a sequence number starting at zero for each new or
    >    rekeyed secure connection, this approach SHOULD be followed.
    > 
    > This is not a proper sentence: I think it’s two sentences splicd together,
    > but it might be that it needs rewording instead.

    I think it works now that the comma is replaced with a full stop, and
    the former sentence is put on a paragraph of its own to clearly separate
    what is mandated and what is recommended.

    > — Section 5 —
    > 
    >    As each pseudoranom number must only be used once,
    >    an implementation need to get a new truly random seed after reboot,
    >    or continously store state in nonvolatile memory, see ([RFC8613],
    >    Appendix B.1.1) for issues and solution approaches for writing to
    >    nonvolatile memory.
    > 
    > And this also looks like two sentences spliced together.

    Yes, changed to two sentences.

    >    They MUST only be
    >    used when the request Echo values are integrity protected.
    > 
    > I think this is a tricky way to word it, and that it invites
    > misunderstanding.  I suggest that it might be better said as, “They MUST
    > NOT be used unless the request Echo values are integrity protected.”

    Agreed and taken verbatim.

    > — Section 5.1 —
    > 
    >    Reusing Tokens in a way so that responses are guaranteed to not be
    >    associated with the wrong request is not trivial as on-path attackers
    >    may block, delay, and reorder messages, requests may be sent to
    >    several servers, and servers may process requests in any order and
    >    send many responses to the same request.
    > 
    > This is a complicated sentence and it has a lot of cascaded negatives.
    > Please try rewording it, and consider splitting it up.  One way is to start
    > with “On-path” to the end of the sentence, and then have another sentence
    > that says, “That makes it non-trivial to reuse tokens...”

    I've removed the "to several servers" part as it doesn't really
    contribute (it can, but not using security protocols other than OSCORE),
    and reordered it to "it's difficult: this already happens regularly. an
    attacker may do that. therefore...". Now reads as:

      Reusing Tokens in a way so that responses are guaranteed to not be
      associated with the wrong request is not trivial: The server may
      process requests in any order, and send multiple responses to the same
      request. An attacker may block, delay, and reorder messages. The use
      of a sequence number is therefore recommended when CoAP is used with a
      security protocol that does not provide bindings between requests and
      responses such as DTLS or TLS.

    >    Unencrypted timestamps MAY
    >    reveal information about the server
    > 
    > This needs to be “may” (or “could”), as it’s a statement, not a directive.

    Agreed, changed to "could".

    >    Like HTTP cookies, the Echo option could potentially be abused as a
    >    tracking mechanism to link to different requests to the same client.
    > 
    > I can’t follow this sentence, particularly the part with the word “to”
    > repeated three times.  Please reword it.

    Reworded to:

      [...] the Echo option could potentially be abused as a tracking
      mechanism that identifies a client across requests.

    >    Clients only send Echo to the same
    >    server from which they were received.
    > 
    > The only possible antecedent to “they” here is “clients”, which is clearly
    > wrong: you mean “Echo”.  So this needs rewording.  Maybe use “Echo
    > options”, or something like that.

    Changed:

      Clients send Echo values to the same server from which the values were
      received.

    > — Section 8.2 —
    > I’m having a hard time deciding whether some of these references should be
    > normative, especially 8613.  Please give these another review with that in
    > mind and see if you think any of them should be moved.  You can find some
    > guidance in the relevant IESG Statement <
    > https://www.ietf.org/about/groups/iesg/statements/normative-informative-references/>,
    > keeping in mind the general rule that something that needs to be fully
    > understood should be normative, while something that just adds extra
    > enlightenment can be informative.

    Most of the document can be applied with either DTLS or OSCORE. But
    given that "[e]ven references that are relevant only for optional
    features must be classified as normative",

    Given that we specify behaviors for token handling over transport
    security (mentioning rekeyings) and body protection for OSCORE, after
    reading the guidance I'm promoting RFC 6347 DTLS and RFC8613 OSCORE to
    normative.

    (CoAP-over-TLS can stay informative as it's only used in "all is fine,
    move on" context).

    >    A server MAY want to encrypt its timestamps
    > 
    > I suggest that a server doesn’t “want” to do anything.  Perhaps it’s better
    > to say, “It might be important to encrypt a server’s timestamps (see
    > Section 6)”.

    As much as I'd enjoy discussing the concept of "the server" as an
    overarching entity encompassing its operator, implementer and
    implementation, I'm taking up the suggestion as not to distract the
    reader.

    >    repeated transmission failure; in DTLS, if no packages are lost)
    > 
    > Should that be “packets”?

    Yes, fixed.

    No changes needed IMO
    =====================

    >    In those situations, no message has any Request-Tag option set, and
    >    that can be recycled indefinitely.
    > 
    > I don’t understand what is being “recycled” if you’re not using he
    > Request-Tag option (also applies to the subsequent sentence).

    There's an explicit note where request tag recycling is introduced that
    for the purpose of recycling, the absence of an option is just another
    "value" for that purpose.

    >    In draft versions of this document, the Request-Tag option used to be
    >    critical and unsafe to forward.  That design was based on an
    >    erroneous understanding of which blocks could be composed according
    >    to [RFC7959].
    > 
    > It makes sense that this was here during working group discussion.  Is
    > there value in having it in the published RFC?  If so, why?

    It's included that way (and not as a to-be-removed-before-publication)
    because seeing that there used to be now-considered-wrong
    interpretations around is valuable information to readers. (Not that I'd
    insist, but maybe it makes sense that way)

    > — Appendix A —
    > 
    >    security against an attacker guessing echo values is given by s = bit
    >    length of r - log2(n).
    > 
    > What is “r”?

    Added a "called r" to the introduction of "a (pseudo-)random byte
    string" at the start of the paragraph.

    Deferred to the other authors
    =============================

    >    Unless a counting Echo value is used, the Echo
    >    option value MUST contain 32 (pseudo-)random bits that are not
    >    predictable for any other party than the server, and SHOULD contain
    >    64 (pseudo-)random bits.
    > 
    > What’s the reason for not just using MUST for 64 bits and being done with
    > it?

    I'd suppose that it's to allow for applications with well controlled
    power cycles and Echo value changes to reduce their message sizes --
    Göran, could you say a bit more here?


    >    Servers MAY use the time since reboot measured in some unit of time.
    > 
    > For what?  It’s not clear to me what this refers to.

    John, Göran, could this be a leftover from the later changes around
    server / wall time?

    Kind regards
    Christian

    -- 
    To use raw power is to make yourself infinitely vulnerable to greater powers.
      -- Bene Gesserit axiom