Re: [TLS] tls-flags: abort on malformed extension

Ilari Liusvaara <ilariliusvaara@welho.com> Mon, 11 October 2021 12:06 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 E52CE3A12EC for <tls@ietfa.amsl.com>; Mon, 11 Oct 2021 05:06:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.499
X-Spam-Level:
X-Spam-Status: No, score=-1.499 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.399, SPF_HELO_NONE=0.001, SPF_NONE=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 7HT2_YS95Pzm for <tls@ietfa.amsl.com>; Mon, 11 Oct 2021 05:06:53 -0700 (PDT)
Received: from welho-filter4.welho.com (welho-filter4b.welho.com [83.102.41.30]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4A9773A12E8 for <tls@ietf.org>; Mon, 11 Oct 2021 05:06:52 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter4.welho.com (Postfix) with ESMTP id 35CDE67E1A for <tls@ietf.org>; Mon, 11 Oct 2021 15:06:49 +0300 (EEST)
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 OpWpYGVwIOtf for <tls@ietf.org>; Mon, 11 Oct 2021 15:06:49 +0300 (EEST)
Received: from LK-Perkele-VII2 (87-92-216-160.rev.dnainternet.fi [87.92.216.160]) (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 F29392315 for <tls@ietf.org>; Mon, 11 Oct 2021 15:06:47 +0300 (EEST)
Date: Mon, 11 Oct 2021 15:06:46 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: "<tls@ietf.org>" <tls@ietf.org>
Message-ID: <YWQo1koGB3htKNd2@LK-Perkele-VII2.locald>
References: <5BFCE990-52C0-4C0C-BD8A-AC3DB0A48084@gmail.com> <E37094D9-A40B-4E7B-BE6B-0AE16F0E0C64@gmail.com> <2fa1d7c1-41b7-4fc0-8775-a3deba54c3a9@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <2fa1d7c1-41b7-4fc0-8775-a3deba54c3a9@redhat.com>
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Jcbu-VureGV1EQuQBjxPjZvrS8w>
Subject: Re: [TLS] tls-flags: abort on malformed extension
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: Mon, 11 Oct 2021 12:06:58 -0000

On Mon, Oct 11, 2021 at 01:12:14PM +0200, Hubert Kario wrote:
> On Thursday, 7 October 2021 20:37:22 CEST, Yoav Nir wrote:
> > 
> > OK, so now my response:
> > 
> > I agree with the first and second comments. About the third, what I
> > meant was that a supported flag that is supposed to appear only in CH
> > appears instead and CR, or more likely, a flag that should appear in EE
> > apears in SH instead.
> > 
> > But I think the best way to resolve the issue is to remove the bullet
> > point list and the last sentence before them, IOW: remove the examples.
> 
> Clients aborting on unrecognised flags in SH or EE is expected, that's what
> already happens for normal extensions, but yes, it's too strong for CH.
> Maybe
> also NST.

I presume flags should mirror how extensions behave (being essentially
compact encoding for zero-length extension), and TLS 1.3 specifies that
known unexpected extension in any message, including CH, causes abort
with illegal_parameter alert (Reference: RFC 8446, Section 4.2).

For unknown extensions, the rule is to ignore any unknown extension in
CH, CR and NST, and abort with unsupported_extension on any unknown
extension in SH, EE and CT (Reference: RFC 8446, Section 4.2).


And there already exists an extension that can trigger the first rule
in CH, namely oid_filters. So an implementation that supports that
extension is supposed to abort if it receives the extension in CH.



-Ilari