Re: [Last-Call] Last Call: <draft-gont-numeric-ids-sec-considerations-06.txt> (Security Considerations for Transient Numeric Identifiers Employed in Network Protocols) to Best Current Practice

Eric Rescorla <ekr@rtfm.com> Sun, 13 December 2020 21:53 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: last-call@ietfa.amsl.com
Delivered-To: last-call@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B47893A0B05 for <last-call@ietfa.amsl.com>; Sun, 13 Dec 2020 13:53:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.004
X-Spam-Level:
X-Spam-Status: No, score=0.004 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.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 Ctff3JQGSM5u for <last-call@ietfa.amsl.com>; Sun, 13 Dec 2020 13:53:24 -0800 (PST)
Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5AC7D3A0AE5 for <last-call@ietf.org>; Sun, 13 Dec 2020 13:53:24 -0800 (PST)
Received: by mail-lf1-x12b.google.com with SMTP id o17so22418859lfg.4 for <last-call@ietf.org>; Sun, 13 Dec 2020 13:53:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bgtQjEqJmVJcvaQhinw7KR5XQTm22meDHmQXEqydHYc=; b=BB+5mfJS0yZiyzvYAPje1jKLFXC0z70AJwPYSWyX+KZszMI3xe1M5pBuaFHir/Wa4x uiPVsqy+V7AbmSg4lVvikFPeGJIEcQuMu11NOVhA5UJpBYTEM7v3jgbxNALKRNm5iIlR l0AVOdZ+FC5/IB01+yiO5DAbuXhELOS4GKluFnLel3Pk5DjUvihKHDk9Q/hb54me7oUN kPlcpv2svgX2JBc0vSUAPgg7lfVLHl/XBeu8+lhDVT8J8brnXP8J9PbTZs4yoe/6IfOY ixfWQAYWcKBR99kftMsgZFClD12k0QNebb1ylFLy6KYQgj0e0wJIKW0atYwLMlmyBHJ9 qn7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bgtQjEqJmVJcvaQhinw7KR5XQTm22meDHmQXEqydHYc=; b=N+4kZHA2Q/7a2pUii2HI7LgQMqpqtd9XRMsZTIp8KsSYiyFi6cqOSkGoecCgB/ej9+ B1eXpWHriSl9rzuyi349j3xdKh1dYuUmMN3zrOHGhkmWPEgDR4GS3J4OXrxKeaqOORN8 SpKQBDxl4fZKrfSSf2OJLdjOp9sbuq7g/F7kRx56hOxxpxU5RGhL6iGRJqV4lar2H6Ir bMU7b2IazqoevExS9gb+fU0sr23CJ6rvp2vz7yLVW6EUJs/at2FEri7aKKkItCf8TBQJ M1wgriISLs5XLBkTkZTtFX5SCM6fODEpy92Y1PMd215SjXYfF2NmV04waM1STbS1/k05 myKA==
X-Gm-Message-State: AOAM530JbVBBmiGyYb6/tzXiHY2YmcP//d4uq+bV/OLz/jP5Bf7oDUDU fG9qM8Du8YRX1phl4a7GjpoHFBWREDTHum1UwlCWsw==
X-Google-Smtp-Source: ABdhPJxIfgsXU6Dg2DpEOTKl8UsPU4zJnjCcwiiJELzgE65YIAHkvsOOU5tSg7cc83+b75dkSEvCxVZK3zBl/n0WRJg=
X-Received: by 2002:a2e:155d:: with SMTP id 29mr5463862ljv.3.1607896402309; Sun, 13 Dec 2020 13:53:22 -0800 (PST)
MIME-Version: 1.0
References: <160735373732.25981.15176977559155786235@ietfa.amsl.com> <CABcZeBM636h_XKwbpZb69TWLTq8-5n0=6CRAqhsB+pWzoZ2a7A@mail.gmail.com> <891c40bd-091d-bb36-a754-3c84a70ac0aa@si6networks.com>
In-Reply-To: <891c40bd-091d-bb36-a754-3c84a70ac0aa@si6networks.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sun, 13 Dec 2020 13:52:46 -0800
Message-ID: <CABcZeBPTk0zrm6iwJOiac6N7w_jYhtkoX3HeBci9tZ_Y8=uKVw@mail.gmail.com>
To: Fernando Gont <fgont@si6networks.com>
Cc: last-call@ietf.org, draft-gont-numeric-ids-sec-considerations@ietf.org
Content-Type: multipart/alternative; boundary="000000000000e547f305b65f8de9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/last-call/8jqvKMkA3_w6GdaI1ZByWS-PMOE>
Subject: Re: [Last-Call] Last Call: <draft-gont-numeric-ids-sec-considerations-06.txt> (Security Considerations for Transient Numeric Identifiers Employed in Network Protocols) to Best Current Practice
X-BeenThere: last-call@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF Last Calls <last-call.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/last-call>, <mailto:last-call-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/last-call/>
List-Post: <mailto:last-call@ietf.org>
List-Help: <mailto:last-call-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/last-call>, <mailto:last-call-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 13 Dec 2020 21:53:27 -0000

On Sun, Dec 13, 2020 at 12:40 AM Fernando Gont <fgont@si6networks.com>
wrote:

> Hello, Eric,
>
> Thanks for your comments! In-line....
>
>
> On 12/12/20 18:44, Eric Rescorla wrote:
> > I do not believe this document should be published as a BCP. I'm
> > slightly negative on publishing it as Informational. I would be
> > somewhat more positive on Informational if there weren't also a number
> > of other drafts on this topic by the same authors. Perhaps they could
> > all be folded together into one piece of really solid guidance.
>
> The three documents you are referring to were originally published as a
> single document at the time (draft-gont-predictable-numeric-ids), when
> we first brought this work to the IETF (almost five years ago), and it
> was split into three documents based on the feedback we got from SAAG.
>

I'm sorry you feel that you are getting inconsistent feedback, but that
doesn't really change my opinion about the disposition of this document.



> > Turning to specific examples, Section 4 lists a number of practices
> > that are described as "common flaws". Out of these, QUIC and
> > DTLS both arguably do the following:
> >
> >     o  Employing trivial algorithms (e.g. global counters) that result in
> >        predictable identifiers
> >
> >     o  Initializing counters or timers to constant values, when such
> >        initialization is not required
> >
> > And potentially:
> >
> >     o  Employing the same increment space across different contexts
> >
> > However, due to their design, QUIC and DTLS are intended to be
> > resistant to attacks based on these choices. In particular, they:
> >
> > 1. Cryptographically authenticate datagrams in order to prevent
> >     injection attacks.
> >
> > 2. Encrypt the packet/sequence numbers so that they are not exposed on
> >     the wire (QUIC all the time and DTLS 1.3).
> >
> > Of course, it might be the case that these defenses are insufficient
> > (that would be useful to know!) but this document does not provide
> > much assistance in making that evaluation.
>
> I'd argue the other way around.
> For example, if you don't need the ID to share the same increment space,
> then, when you are sharing the same increment space, you're potentially
> leaking information (resulting from the increments) from one context to
> the other, without any requirement to do so.
>
> And my question would be: why do it, when you don't need to?  If this
> information turned out to be of use for an attacker, would the argument
> be "Well, we knew we were unnecessarily leaking information, but even
> when we had choices not to, we did it anyways, because we thought it was
> harmless"?
>

Let's take the specific case of QUIC and DTLS packet/sequence numbers.

In both cases, the packet/sequence numbers start from zero and increment
monotonically (arguably violating the first two points) and regardless of
path
(violating the second two points). Now, either this is an OK practice
because
of header encryption (the position that both QUIC and DTLS take) or it is
a bad practice (the position that this draft seems to take). But we
shouldn't
be simultaneously publishing documents which take both positions.

To address your substantive point: I don't think this is leaking
information to
the attacker because the headers are encrypted, and having some other
structure would be more complicated in a number of ways.



> > Moving to the requirements in S 5, I note that neither QUIC nor DTLS
> > recommends an algorithm for generating connection IDs, which would
> > violate requirement #3.
> >
> >     3.  Recommend an algorithm for generating the aforementioned
> >         identifiers that mitigates security and privacy issues, such as
> >         those discussed in [I-D.irtf-pearg-numeric-ids-generation].
> >
> > Instead, QUIC provides requirements for how CIDs must work but not an
> > algorithm
> > (
> https://datatracker.ietf.org/doc/html/draft-ietf-quic-transport-32#section-5.1
> ).
> >
> >     Connection IDs MUST NOT contain any information that can be used by
> >     an external observer (that is, one that does not cooperate with the
> >     issuer) to correlate them with other connection IDs for the same
> >     connection.  As a trivial example, this means the same connection ID
> >     MUST NOT be issued more than once on the same connection.
>
> I believe that not recommending a good/safe choice for generating IDs
> has been proved to be problematic. If a protocol is successful enough,
> it's very likely that you will see multiple independent implementations
> (from folks that are not involved in the protocol design, etc.), and
> that bad choices will be made if there is no recommendation.
>

As noted above, QUIC connection identifiers are opaque and indeed are
specifically not intended to be interpreted by the other side. Thus if
the structure of those identifiers is relevant, something has gone wrong.


> I'm not saying that cryptographic protocols don't need to take care in
> > identifer selection, but the guidance in this document does not seem
> > very helpful in that respect. It's no doubt the case that the IETF
> > will in the future design some non-cryptographic protocols where this
> > kind of guidance will be on-point, but I don't think that in 2020
> > we should publish a document as BCP which ignores so much of current
> > practice.
>
> Could you please elaborate?
>
> We did evaluate what has happened to multiple protocols from different
> layers. And the findings seem to converge for all of them.
>
> I don't think you can claim that what has been done in one specific
> protocol from one specific layer is "current practice".
>

My position is that modern practice is to design protocols that have
encryption
(this is strongly encouraged by RFC 7258 and also is just what we're doing)
and this document neither (a) engages with that nor (b) provides
particularly
helpful guidance for encrypted protocols.


Almost four years have passed. I wished we could do something to prevent
> these issues from continuing to happen in our protocols and their
> corresponding implementations. And I'd certainly prefer not to try to
> boil the ocean once more.
>

As I noted, such an effort is already underway, so this work could feed
into it. As your documents are already out there and available in the
drafts repo, I don't feel that there is any rush to have this in RFC form.

-Ekr