Re: [DNSOP] A draft about the Name:Wreck problem draft-dashevskyi-dnsrr-antipatterns

Mark Andrews <marka@isc.org> Thu, 15 April 2021 07:46 UTC

Return-Path: <marka@isc.org>
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 98A1C3A1446 for <dnsop@ietfa.amsl.com>; Thu, 15 Apr 2021 00:46:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=isc.org header.b=P87MIunJ; dkim=pass (1024-bit key) header.d=isc.org header.b=Qe3Ba3zn
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 5vGyRf1EqXAR for <dnsop@ietfa.amsl.com>; Thu, 15 Apr 2021 00:46:35 -0700 (PDT)
Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) (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 CCBCC3A1445 for <dnsop@ietf.org>; Thu, 15 Apr 2021 00:46:35 -0700 (PDT)
Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id 935D93AB01F; Thu, 15 Apr 2021 07:46:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=isc.org; s=ostpay; t=1618472793; bh=/fdobcIo7OKQBa/UVQ1KEduhZk5Tv10wP9KL8klL54A=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=P87MIunJijVOdZCfw1FW1XGIO6woTpAE+r2fYkGWBi/xAYa8Th8YpKzQB2hCr9gIB 2uugbAn2LRojH23KBN3b+qilV1yOww538/o3eLH2xcCtPJA8UirDf+UUQumV4V0W88 /s02P6qhYFVACA+dRazKarrVmmcNIYa8Wh82hyTI=
Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id 6DC3316007B; Thu, 15 Apr 2021 07:46:33 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 454E716007A; Thu, 15 Apr 2021 07:46:33 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.9.2 zmx1.isc.org 454E716007A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isc.org; s=05DFB016-56A2-11EB-AEC0-15368D323330; t=1618472793; bh=lfDWooq6ZHId5F9LfUKr5RoLrl09/NjJj1cJhJb9dzw=; h=Content-Type:Mime-Version:Subject:From:Date: Content-Transfer-Encoding:Message-Id:To; b=Qe3Ba3zn6NEkzmvlQYAMrtlll8kYc2jpTcR1yJE1Jk4+LFHS2Pm7Y6J3ClVhGqDik VOhL8oQUHQP4DzEIeR8Cjks6HdHPMmaVr5Cld3mq8jYIORJBv4mu91m+EKBuQ0ECuq FKO4w/C3Fbiay04Bphq2ewMxZ8st8JeCd0+Nt89M=
Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id K1w9A12wt3XP; Thu, 15 Apr 2021 07:46:33 +0000 (UTC)
Received: from [172.30.42.67] (n49-177-132-25.bla3.nsw.optusnet.com.au [49.177.132.25]) by zmx1.isc.org (Postfix) with ESMTPSA id 5FAF416006D; Thu, 15 Apr 2021 07:46:32 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\))
From: Mark Andrews <marka@isc.org>
In-Reply-To: <20210415072803.2qumw3f7h5g7n2hp@family.redbarn.org>
Date: Thu, 15 Apr 2021 17:46:29 +1000
Cc: dnsop@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <A1683ACA-AA64-41EC-8E51-BB657C3297BD@isc.org>
References: <20210414133641.A18B572E0509@ary.qy> <59df7967-2fef-371a-4d34-4c8efec74ca0@dotat.at> <628E22EC-3395-45AB-9FD8-2405A92682BA@isc.org> <49f57263-c68c-eb2a-a7b7-7b3028dacbc8@huitema.net> <20210415072803.2qumw3f7h5g7n2hp@family.redbarn.org>
To: Paul Vixie <paul@redbarn.org>
X-Mailer: Apple Mail (2.3445.9.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/3yM61e25Xraq7ROP2CtTKgepaPU>
Subject: Re: [DNSOP] A draft about the Name:Wreck problem draft-dashevskyi-dnsrr-antipatterns
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 15 Apr 2021 07:46:41 -0000


> On 15 Apr 2021, at 17:28, Paul Vixie <paul@redbarn.org> wrote:
> 
>>>> I don't think it's entirely fair to blame the coders who make these
>>>> mistakes, because a very large number of excellent programmers have
>>>> made a mess of DNS name decompression. ...
> 
> i shipped the crap in question as late as 1998, and excellence wasn't the
> problem. in this field at that time, crap was the norm, and this crap was
> better than most -- "excellent" if you will, by the standards of the day.
> 
> this is not that day, and while crap may still be an internet norm, it is
> no longer excellent. here are some of the things you can be sure of:
> 
> 1. somebody wrote or copied this code in C and didn't red-team it
> 2. somebody copied this code without tracking where they copied it from
> 
> so, freebsd was unfairly maligned in the forescout report on this event;
> the bug was in their dhcp client, not their dns or "tcp/ip stack", and
> had been fixed 20 years late but still six months ago.

The freebsd code still isn’t correct "if (0xc0 & len) {" != "if ((0xc0 & len) == 0xc0) {“
which is the correct test for a compression pointer.

The frustrating part is that it could have all been done safely with libresolv
rather than reinventing the wheel.  The pain had already been taken with libresolv.

> everything else on that list was properly and fairly maligned, and ought
> to be grounds to wonder what other code those vendors have written or
> copied in C, without red-teaming it, and without tracking later changes.
> 
>>>> It seems worthwhile to try to help future coders not to mess it up.
> 
> as a technology action, sure. but we've got to stop writing crap generally
> not just in decoders. that means red-teaming things before they go out,
> and only dealing with vendors who can afford to do this. (C, having as it
> does no bounds checking, allows any pointer to be wild -- So Expect That.)
> 
> "as long as people write parsers,
> and connect them to the internet,
> i'll have work." --anon
> 
> -- 
> Paul Vixie
> 
> _______________________________________________
> DNSOP mailing list
> DNSOP@ietf.org
> https://www.ietf.org/mailman/listinfo/dnsop

-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742              INTERNET: marka@isc.org