[DNSOP] Risk of using underscores for sentinel (Was: A conversational description of sentinel.

Stephane Bortzmeyer <bortzmeyer@nic.fr> Mon, 12 February 2018 11:28 UTC

Return-Path: <bortzmeyer@nic.fr>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 08FB21275FD for <dnsop@ietfa.amsl.com>; Mon, 12 Feb 2018 03:28:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.91
X-Spam-Level:
X-Spam-Status: No, score=-6.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, T_RP_MATCHES_RCVD=-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 xCRCxGbyswlw for <dnsop@ietfa.amsl.com>; Mon, 12 Feb 2018 03:28:22 -0800 (PST)
Received: from mx4.nic.fr (mx4.nic.fr [IPv6:2001:67c:2218:2::4:12]) (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 56A3A12420B for <dnsop@ietf.org>; Mon, 12 Feb 2018 03:28:22 -0800 (PST)
Received: from mx4.nic.fr (localhost [127.0.0.1]) by mx4.nic.fr (Postfix) with SMTP id E7E3028074B; Mon, 12 Feb 2018 12:28:20 +0100 (CET)
Received: by mx4.nic.fr (Postfix, from userid 500) id E1F2428074E; Mon, 12 Feb 2018 12:28:20 +0100 (CET)
Received: from relay01.prive.nic.fr (unknown [10.1.50.11]) by mx4.nic.fr (Postfix) with ESMTP id DB42328074B; Mon, 12 Feb 2018 12:28:20 +0100 (CET)
Received: from b12.nic.fr (b12.tech.ipv6.nic.fr [IPv6:2001:67c:1348:7::86:133]) by relay01.prive.nic.fr (Postfix) with ESMTP id D84EB61083E3; Mon, 12 Feb 2018 12:28:20 +0100 (CET)
Received: by b12.nic.fr (Postfix, from userid 1000) id CB6B2401E0; Mon, 12 Feb 2018 12:28:20 +0100 (CET)
Date: Mon, 12 Feb 2018 12:28:20 +0100
From: Stephane Bortzmeyer <bortzmeyer@nic.fr>
To: Vladimír Čunát <vladimir.cunat+ietf@nic.cz>
Cc: dnsop@ietf.org
Message-ID: <20180212112820.jt3qqsl5pm3r7qf4@nic.fr>
References: <74C0CA59-6D53-4A60-ACBA-4AF5B51FE3FF@apnic.net> <D5D013D4-1EAD-434B-863A-29CB1BBEF4E4@vpnc.org> <496EFA88-BA70-460B-BFB2-69B2C7BC905D@apnic.net> <4540A279-4A37-4245-AE61-BEE5342E3F72@vpnc.org> <20180202075530.Horde.UWaxe9eenZ7PyxWYFHCFGdN@andreasschulze.de> <e8ac7bd0-26e6-cf97-e2ef-0ead50dc18ce@nic.cz> <88E7D27C-048E-44CB-B317-C892EA603D31@isc.org> <0c2a4a38-49d7-2b46-1ac8-1dda0812e217@nic.cz> <CAHw9_iJ6yL12OaGW5+fm8M3YUkrj46CvC2-ob7Xrc5HEaA_Z1Q@mail.gmail.com> <6acdf6cc-965d-f126-a8f7-eb74b9164f07@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <6acdf6cc-965d-f126-a8f7-eb74b9164f07@nic.cz>
X-Operating-System: Debian GNU/Linux 9.3
X-Kernel: Linux 4.9.0-5-amd64 x86_64
X-Charlie: Je suis Charlie
Organization: NIC France
X-URL: http://www.nic.fr/
User-Agent: NeoMutt/20170113 (1.7.2)
X-Bogosity: No, tests=bogofilter, spamicity=0.007820, version=1.2.2
X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2018.2.12.111516
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/KUEZmKU_avYbugWAbIGeMArRhkA>
Subject: [DNSOP] Risk of using underscores for sentinel (Was: A conversational description of sentinel.
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Feb 2018 11:28:24 -0000

On Mon, Feb 05, 2018 at 12:56:47PM +0100,
 Vladimír Čunát <vladimir.cunat+ietf@nic.cz> wrote 
 a message of 8 lines which said:

> Current Firefox 58.0.1 and old Chromium 61.0.3163.79, Linux, same
> result.  The system resolver does fetch _www.ksk-test.net. OK.  (I
> can't say I understand what happens.)

Isn't is simply because some browsers rely on the standard library's
getaddrinfo() and this routine does not accept all domain names? On Linux:

#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \
		   || ((c) >= 0x61 && (c) <= 0x7a))
#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)

#define borderchar(c) (alphachar(c) || digitchar(c))
#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c))
#define	domainchar(c) ((c) > 0x20 && (c) < 0x7f)

int
res_hnok(const char *dn) {
	int pch = PERIOD, ch = *dn++;

	while (ch != '\0') {
		int nch = *dn++;

		if (periodchar(ch)) {
			(void)NULL;
		} else if (periodchar(pch)) {
			if (!borderchar(ch))
				return (0);
		} else if (periodchar(nch) || nch == '\0') {
			if (!borderchar(ch))
				return (0);
		} else {
			if (!middlechar(ch))
				return (0);
		}
		pch = ch, ch = nch;
	}
	return (1);
}	

Underscores are not accepted at the beginning of a name.

% dig +short +nodnssec _www.ksk-test.net
ron.kumari.net.
204.194.23.4

% ping _www.ksk-test.net          
ping: _www.ksk-test.net: Name or service not known

If you want to check on FreeBSD, it's here:

https://svnweb.freebsd.org/base/head/lib/libc/net/gethostbydns.c?view=markup#l140