Re: [TLS] I-D Action: draft-ietf-tls-subcerts-06.txt

Ilari Liusvaara <ilariliusvaara@welho.com> Sun, 09 February 2020 14:02 UTC

Return-Path: <ilariliusvaara@welho.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E5AE1120103 for <tls@ietfa.amsl.com>; Sun, 9 Feb 2020 06:02:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=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 Xt6UUcUyv2c2 for <tls@ietfa.amsl.com>; Sun, 9 Feb 2020 06:02:49 -0800 (PST)
Received: from welho-filter4.welho.com (welho-filter4.welho.com [83.102.41.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C670012001B for <tls@ietf.org>; Sun, 9 Feb 2020 06:02:48 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by welho-filter4.welho.com (Postfix) with ESMTP id A8C534552F for <tls@ietf.org>; Sun, 9 Feb 2020 16:02:45 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter4.welho.com [::ffff:83.102.41.26]) (amavisd-new, port 10024) with ESMTP id k2VM9EIUh03O for <tls@ietf.org>; Sun, 9 Feb 2020 16:02:44 +0200 (EET)
Received: from LK-Perkele-VII (87-100-246-37.bb.dnainternet.fi [87.100.246.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPSA id 28C2A2315 for <tls@ietf.org>; Sun, 9 Feb 2020 16:02:42 +0200 (EET)
Date: Sun, 09 Feb 2020 16:02:42 +0200
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: tls@ietf.org
Message-ID: <20200209140242.GA1489626@LK-Perkele-VII>
References: <158093501262.12877.10966121264461280401@ietfa.amsl.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <158093501262.12877.10966121264461280401@ietfa.amsl.com>
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/HPlwUm29Fms8rxt2_t3TI1ds15I>
Subject: Re: [TLS] I-D Action: draft-ietf-tls-subcerts-06.txt
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 09 Feb 2020 14:02:52 -0000

On Wed, Feb 05, 2020 at 12:36:52PM -0800, 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 Transport Layer Security WG of the IETF.
> 
>         Title           : Delegated Credentials for TLS
>         Authors         : Richard Barnes
>                           Subodh Iyengar
>                           Nick Sullivan
>                           Eric Rescorla
> 	Filename        : draft-ietf-tls-subcerts-06.txt
> 	Pages           : 15
> 	Date            : 2020-02-05

I noticed the following:

> The algorithm and expected_cert_verify_algorithm fields MUST be of a
> type advertised by the client in the SignatureSchemeList and are
> considered invalid otherwise.  Clients that receive invalid delegated
> credentials MUST terminate the connection with an "illegal_parameter"
> alert.

This can be interpretted that the delegated_credentials extension
constrains the end-entity certificate algorithm if DC is sent. This has
seemingly undesirable consequences if the list diverges from what the
signature_algorithms contains:

1) If delegated_credentials contains algorithm that signature_algorithms
does not, the server may use that as DC signing algorithm, which will
cause PKIX code to blow up.

2) If delgated_credentials is missing some algorithm that
signature_algorithms contains, the client needs to constrain the PKIX
validation further.

These issues are made worse by the fact that delegated credential
validation code is seemingly intended to be separate from PKIX validation
code, meaning the two can diverge from one another (which is a reason
for having separate lists).

Looking at the steps to validate the delegated credential, there is
no explicit step to validate signing algorithm, which would imply that
the signing algorithm is constrained by the PKIX code, which would
contradict the above.

Then because *_rsae is not allowed in expected algorithm, clients would
need to include algorithm that can not be used, if they support *_rsae
for PKIX signatures (however, there could be reasons not to support
*_rsae for signing DCs, see below).


And:

> The algorithm and expected_cert_verify_algorithm fields MUST be of a
> type advertised by the server in the "signature_algorithms" extension
> and are considered invalid otherwise.  Servers that receive invalid
> delegated credentials MUST terminate the connection with an
> "illegal_parameter" alert.

Is there a reason why client can specify another set of algorithms for
verification of delegated credentials, but the server can not?


Then in security considerations, I do not see the following issue
discussed:

- Server has RSA key that has delegation_usage and is usable for
  RSA encryption.
- Server is vulernable to BB98/ROBOT.
- Attacker uses BB98/ROBOT to sign a delegated credential.
- Attacker impersonates the server using the forged delegated
  credential.

It is much easier to perform this kind of attack than to use BB98/ROBOT
to impersonate without delgated credentials:

- Much longer time window to perform the attack (limited by certificate
  lifetime, not how long client waits).
- One can impersonate server multiple times per successful attack, not
  just once.

This could be generalized to any signing oracle, but the ones
associated with RSA encryption (BB98/ROBOT/DROWN) are the most common
ones.





-Ilari