Re: [TLS] Narrowing allowed characters in ALPN ?

Christian Huitema <huitema@huitema.net> Thu, 20 May 2021 16:18 UTC

Return-Path: <huitema@huitema.net>
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 DAB0E3A1C6E for <tls@ietfa.amsl.com>; Thu, 20 May 2021 09:18:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.89
X-Spam-Level:
X-Spam-Status: No, score=-1.89 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01] 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 meGggDfOmx_c for <tls@ietfa.amsl.com>; Thu, 20 May 2021 09:18:08 -0700 (PDT)
Received: from mx36-out10.antispamcloud.com (mx36-out10.antispamcloud.com [209.126.121.30]) (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 1F2C13A1C71 for <tls@ietf.org>; Thu, 20 May 2021 09:18:07 -0700 (PDT)
Received: from xse245.mail2web.com ([66.113.196.245] helo=xse.mail2web.com) by mx134.antispamcloud.com with esmtp (Exim 4.92) (envelope-from <huitema@huitema.net>) id 1ljlN6-0005cK-AV for tls@ietf.org; Thu, 20 May 2021 18:18:06 +0200
Received: from xsmtp21.mail2web.com (unknown [10.100.68.60]) by xse.mail2web.com (Postfix) with ESMTPS id 4FmFJm6BC5z1v5M for <tls@ietf.org>; Thu, 20 May 2021 09:18:00 -0700 (PDT)
Received: from [10.5.2.49] (helo=xmail11.myhosting.com) by xsmtp21.mail2web.com with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from <huitema@huitema.net>) id 1ljlN2-000747-O9 for tls@ietf.org; Thu, 20 May 2021 09:18:00 -0700
Received: (qmail 24792 invoked from network); 20 May 2021 16:17:58 -0000
Received: from unknown (HELO [192.168.1.103]) (Authenticated-user:_huitema@huitema.net@[172.58.43.161]) (envelope-sender <huitema@huitema.net>) by xmail11.myhosting.com (qmail-ldap-1.03) with ESMTPA for <ietf-dane@dukhovni.org>; 20 May 2021 16:17:58 -0000
To: tls@ietf.org, Viktor Dukhovni <ietf-dane@dukhovni.org>
References: <CAKC-DJjSq2sVKsJphX4QQBHOBojnTVHNE-wkdnZyZtv8NiGpQA@mail.gmail.com> <087dc7db-10a7-4c5b-98c0-005500d67c73@www.fastmail.com> <24683C81-4A7E-4393-B96C-3C7EB87C5C68@akamai.com> <CAHbrMsD=atgKLr+eN+W2ieuF7YrP3pm-05B=txEoDOMrCGPRvg@mail.gmail.com> <CAF8qwaALPVmcL0+69TTE62sAFUqTBixaU-iqu8ZpPHvbZg+Gpg@mail.gmail.com> <YKaAG+5Xh78Zara8@straasha.imrryr.org>
From: Christian Huitema <huitema@huitema.net>
Message-ID: <00973058-fbb5-3f93-4439-e46e2b51828e@huitema.net>
Date: Thu, 20 May 2021 06:17:59 -1000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1
MIME-Version: 1.0
In-Reply-To: <YKaAG+5Xh78Zara8@straasha.imrryr.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US
X-Originating-IP: 66.113.196.245
X-Spampanel-Domain: xsmtpout.mail2web.com
X-Spampanel-Username: 66.113.196.0/24
Authentication-Results: antispamcloud.com; auth=pass smtp.auth=66.113.196.0/24@xsmtpout.mail2web.com
X-Spampanel-Outgoing-Class: unsure
X-Spampanel-Outgoing-Evidence: Combined (0.15)
X-Recommended-Action: accept
X-Filter-ID: Pt3MvcO5N4iKaDQ5O6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ARlsTalAaf
X-Report-Abuse-To: spam@quarantine11.antispamcloud.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/IegZ0ySNcOABrsnPxvURW97vSaQ>
Subject: Re: [TLS] Narrowing allowed characters in ALPN ?
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: Thu, 20 May 2021 16:18:10 -0000

On 5/20/2021 5:28 AM, Viktor Dukhovni wrote:
> On Thu, May 20, 2021 at 11:23:15AM -0400, David Benjamin wrote:
>
>> SVCB's syntax would need us to not only exclude non-ASCII characters but
>> also avoid random delimiters like commas, right? I think that's going a bit
>> too far. As Ryan notes, complex definitions for allowed strings result in
>> ambiguities around who is responsible for validating what and subtle
>> variations in different implementations. That ambiguity can lead to
>> injection attacks when one component of a system expects some validation,
>> but the other component disagrees.
> Just the registry needs to be restricted.  TLS implementations would
> support all possible inputs.  HTTPS/SVCB would no longer need to parse
> complex quoted input formats.

Before the WG settles on restrictions, we may want to take a look at how 
ALPNs are used now, and what usage we can predict in the future. My 
personal experience is that they are used liberally. Application 
developers create protocols for a variety of reasons, such as the series 
of "h9-??" or "h3-??" protocols used in the QUIC WG, the "picoquic-test" 
ALPN used in the test suite of the "picoquic" implementation, the 
"picoquic-sample" ALPN used in the picoquic API samples, or the "doq-??" 
ALPN used to test DNS over QUIC.

All the examples I have seen in the wild are indeed ASCII strings, but 
then they come from English speaking developers. If my mother tongue was 
Chinese or Arabic, I might very well have picked non ASCII values. Very 
few of these end up registered with IANA. The registration is really 
useful when the application protocol is somehow standardized, with 
multiple implementations of clients and servers having to agree on the 
value. It is not required in practice when clients and servers are 
developed by the same organization, or by a closely cooperating set of 
organizations. The ALPN is whatever looks expressive to the developers 
and is unlikely to collide with other usage. The occasional collision 
would only be a problem if the same server was supporting multiple 
application protocols with colliding names.

So, maybe, peace and UTF8?

-- Christian Huitema