Re: [Uta] 6125bis -- security considerations

Ryan Sleevi <ryan-ietf@sleevi.com> Tue, 05 October 2021 15:57 UTC

Return-Path: <ryan.sleevi@gmail.com>
X-Original-To: uta@ietfa.amsl.com
Delivered-To: uta@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5B1523A0AAB for <uta@ietfa.amsl.com>; Tue, 5 Oct 2021 08:57:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.645
X-Spam-Level:
X-Spam-Status: No, score=-1.645 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no 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 XhJ-l-VKM3Qk for <uta@ietfa.amsl.com>; Tue, 5 Oct 2021 08:57:51 -0700 (PDT)
Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 C42363A0AAA for <uta@ietf.org>; Tue, 5 Oct 2021 08:57:51 -0700 (PDT)
Received: by mail-pl1-f181.google.com with SMTP id y5so2624057pll.3 for <uta@ietf.org>; Tue, 05 Oct 2021 08:57:51 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xyl/+MvYNUlB69PYUJaQgPWjZU5FNZItCXfsJsnyhGM=; b=rvzmUHXN2MmWUWVYdG3jdreXndWK7IkMot/bDElNslINe8OSXnGnGbISfrO9aw4ZcG YrQ7p06KKZKc1eWMrXmxWFTiCaTUYzv8qaOloqa0jVukth91nYjZgoWTEAP1Ij0YeP+z 6z3S3ZCT8QSW2jXGLpKzZIsszBN4Ju/X2/xb3CGR8sHnt0KAEIgGo0WO2MIcnXom3mnW CsYph7aGUkqnGPFVwj+SsMJ0Kl1qynRTHrOni71vVrMzdlOZewSY8O/3iVy9s6StSTWo 75fLJ36MjOLUucpgvnW2sL6zkisE00HNJgTFlAdnXyDX5pBXyy7kglFb6ZutM5O4KxxJ 1/ng==
X-Gm-Message-State: AOAM532RR8Mphzmvw5iwEfpU3ByW7wRJA1KRFzt57oxme0peIAuBztJL I5SITNzc+zGlNreJXdwv+0u9+DbfMQk=
X-Google-Smtp-Source: ABdhPJzmwoLraK7FXu3c5xIeH30bC8RxNfyq9AsHi793DzcJVeRHo61a5+AW1hwK/Uyh0+u7ePh7pQ==
X-Received: by 2002:a17:90a:b78d:: with SMTP id m13mr4721325pjr.17.1633449471016; Tue, 05 Oct 2021 08:57:51 -0700 (PDT)
Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com. [209.85.215.175]) by smtp.gmail.com with ESMTPSA id v13sm2550654pjr.3.2021.10.05.08.57.50 for <uta@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Oct 2021 08:57:50 -0700 (PDT)
Received: by mail-pg1-f175.google.com with SMTP id e7so20209094pgk.2 for <uta@ietf.org>; Tue, 05 Oct 2021 08:57:50 -0700 (PDT)
X-Received: by 2002:a62:6243:0:b0:44b:e10e:61b0 with SMTP id w64-20020a626243000000b0044be10e61b0mr30957562pfb.53.1633449470075; Tue, 05 Oct 2021 08:57:50 -0700 (PDT)
MIME-Version: 1.0
References: <03D3917B-3719-4466-8739-2066C601E116@akamai.com> <CAErg=HEbPtHXTtitu3qV4N=S9owaR3q9vFjAU3wwmvLu2cdJYQ@mail.gmail.com> <7A122F49-7508-471E-8905-307E1BFDC486@akamai.com> <CAErg=HEH7GixkrE7Tb15-fUqEQ9cQH69mZVdPfELXguuJHiqVA@mail.gmail.com> <314E0F45-92B2-40C6-9FA7-655195A8B685@akamai.com>
In-Reply-To: <314E0F45-92B2-40C6-9FA7-655195A8B685@akamai.com>
From: Ryan Sleevi <ryan-ietf@sleevi.com>
Date: Tue, 05 Oct 2021 11:57:39 -0400
X-Gmail-Original-Message-ID: <CAErg=HE8asyMmgZHWTCRtnecwP+-tFcAp=hG183jvoH+gHERxA@mail.gmail.com>
Message-ID: <CAErg=HE8asyMmgZHWTCRtnecwP+-tFcAp=hG183jvoH+gHERxA@mail.gmail.com>
To: "Salz, Rich" <rsalz@akamai.com>
Cc: Ryan Sleevi <ryan-ietf@sleevi.com>, Alexey Melnikov <aamelnikov@fastmail.fm>, "uta@ietf.org" <uta@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000006c292a05cd9d17ae"
Archived-At: <https://mailarchive.ietf.org/arch/msg/uta/EmT_XEKYQbVz50S4XFAhPCVwGbw>
Subject: Re: [Uta] 6125bis -- security considerations
X-BeenThere: uta@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: UTA working group mailing list <uta.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/uta>, <mailto:uta-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/uta/>
List-Post: <mailto:uta@ietf.org>
List-Help: <mailto:uta-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/uta>, <mailto:uta-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Oct 2021 15:57:56 -0000

On Mon, Oct 4, 2021 at 9:29 AM Salz, Rich <rsalz@akamai.com> wrote:

>
>    - What sort of ripple effects are you thinking?
>
>
>
> Purely editorial within the document which talks about one or more
> DNS-ID/URI-ID in a couple of places.
>
>
>
>    - I agree that, in practice, the use of multiple names has been
>    normalized beyond the "SNI workaround" (e.g. the discussions on cross-SNI
>    resumption or the ORIGIN frame), so removing that text seems acceptable,
>    but I suspect that we'd both be on the same page of wanting to say
>    _something_ about the risks, such as cross-protocol attacks. And if we're
>    going to discuss those, would it also be appropriate to discuss the
>    concerns about accepting multiple different _types_ of identifiers within a
>    message, and the intersection that can play with, for example,
>    nameConstraints.
>
>
>
> Yes I think we are.
>
>
>
>    - That is, I've seen far too many implementations that will accept
>    (DNS-ID || URI-ID) within a TLS endpoint, but will happily ignore that
>    while a DNS-ID will be constrained by DNS nameConstraints, those same
>    nameConstraints won't constrain the URI-ID unless URI nameConstraints are
>    included, and notably... they aren't required to be included in popular
>    PKIs like the Web PKI.
>
>
>
> I didn’t even realize URI nameConstraints were possible.
>
>
>
>    - Happy to suggest text if folks think it's worth tackling during this
>    revision, although it seems a separate-but-related attack to the
>    cross-protocol attack.
>
>
>
> Please do!
>

Done, in
https://github.com/richsalz/draft-ietf-uta-rfc6125bis/pull/29#discussion_r722367686
- although I'm happy to move this to a separate discussion/PR/issue, if
you'd prefer. It started off with this discussion, but clearly, it's a much
broader change. It does try and reintroduce the ALPN conversation, although
with a looser 2119 fit, and trying to explain the "why" of the SHOULD, in a
way directly relevant to this specification, in a way that is hopefully
acceptable to mitigating the concerns previously raised.

I'm specifically proposing splitting up "Multiple Identifiers" into two
discussions - "Multiple Presented Identifiers" (multiple names in certs,
and concerns for server operators) and "Multiple Reference Identifiers"
(multiple acceptable names to match, and concerns for client
implementations)

The proposed new text is reproduced below (improperly wrapped), again, for
the GitHub averse :)

This specification allows multiple DNS-IDs, SRV-IDs, or URI-IDs in a
> certificate, which allows for a single application service to use the
> same certificate for multiple identifiers. This enables a single
> certificate
> to be used across multiple hostnames, such as when a client does not
> support the TLS SNI extension, or across multiple protocols, such as
> SMTP and HTTP, on a single hostname. The use of a single certificate
> and public/private keypair in such environments MAY facilitate
> cross-protocol attacks, particularly when used in differing TLS
> configurations. See, for example, {{ALPACA}}, {{DROWN}}. Server
> operators SHOULD take steps to mitigate the risk of cross-protocol
> attacks, such as ensuring all TLS endpoints using a given certificate
> support exactly the same TLS version(s) and ciphersuite(s), and
> SHOULD make use of the TLS ALPN extension to ensure the correct
> protocol is used.


> ## Multiple Reference Identifiers


> This specification describes how a client may construct multiple
> acceptable reference identifiers, and may match any of those reference
> identifiers with the set of presented identifiers. {{PKIX, Section
> 4.2.1.10}}
> describes a mechanism to allow CA certificates to be constrained in the
> set of presented identifiers that they may include within server
> certificates.
> However, these constraints only apply to the explicitly enumerated name
> forms. For example, a CA that is only name constrained for DNS-IDs is not
> constrained for SRV-IDs and URI-IDs, unless those name forms are also
> explicitly included within the name constraints extension.


> A client that constructs multiple reference identifiers of different types,
> such as both DNS-ID and SRV-IDs, as described in
> {#verify-reference-rules}, SHOULD take care to ensure that CAs issuing
> such certificates are appropriately constrained. This MAY take the form of
> local policy through agreement with the issuing CA, or MAY be enforced by
> the client requiring that if one form of presented identifier is
> constrained,
> such as a dNSName name constraint for DNS-IDs, then all other forms of
> acceptable reference identities are also constrained, such as requiring a
> uniformResourceIndicator name constraint for URI-IDs.


I understand this latter text may have some degree of controversy attached;
one of the intended aspects of flexibility with nameConstraints was
precisely that it allows new name forms to be introduced in the future,
without requiring the reissuance of certificates. I've tried to balance
that with the client behaviour, namely, that a client shouldn't construct a
given reference identifier / allow a match for a given reference identifier
unless it's constrained, _if_ it accepts other forms of constrained
reference identifiers.

The canonical example here of the challenge is something like introducing
support for SRV-IDs within browser clients, which would be a huge boon to
reducing the risk of cross-protocol issues like ALPACA. However, clients
cannot (safely) do this as long as there exist servers that are only
constrained for dNSNames, without corresponding SRVName constraints. This
tries to balance that, by suggesting the client should, when presented with
such a constrained chain, only allow DNS-ID reference identifiers to match
(because the indication that "some" constraint was intended). Reissuance of
that intermediate, to also constrain SRVName, would provide the explicit
signal to the client that it's acceptable (or not) to use SRV-ID reference
identifiers.

This does not holistically integrate it (e.g. by adding a cross-reference
to #verify-reference-rules to the security considerations), but is meant to
see if there is objection/concern with this approach.