Re: [DNSOP] Clarification question: compression pointers always to names earlier in the packet?

"John Dickinson" <jad@sinodun.com> Wed, 24 October 2018 13:39 UTC

Return-Path: <jad@sinodun.com>
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 E3E7F128DFD for <dnsop@ietfa.amsl.com>; Wed, 24 Oct 2018 06:39:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 vGJxhf3jqui6 for <dnsop@ietfa.amsl.com>; Wed, 24 Oct 2018 06:38:59 -0700 (PDT)
Received: from balrog.mythic-beasts.com (balrog.mythic-beasts.com [IPv6:2a00:1098:0:82:1000:0:2:1]) (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 D965D127332 for <dnsop@ietf.org>; Wed, 24 Oct 2018 06:38:58 -0700 (PDT)
Received: from [2001:b98:204:102:fff1::f145] (port=52361 helo=[192.168.12.13]) by balrog.mythic-beasts.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <jad@sinodun.com>) id 1gFJN7-0007Nd-DL for dnsop@ietf.org; Wed, 24 Oct 2018 14:38:57 +0100
From: "John Dickinson" <jad@sinodun.com>
To: dnsop <dnsop@ietf.org>
Date: Wed, 24 Oct 2018 14:38:51 +0100
X-Mailer: MailMate (1.12r5523)
Message-ID: <EC514300-F235-41DB-A413-2F9F8F8B04C8@sinodun.com>
In-Reply-To: <BC2CDF40-4FF0-4111-88B7-04969491D2E0@dukhovni.org>
References: <BC2CDF40-4FF0-4111-88B7-04969491D2E0@dukhovni.org>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
X-BlackCat-Spam-Score: 9
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/WEbIYbf0L0318Dzn6vvI8cDDyRU>
Subject: Re: [DNSOP] Clarification question: compression pointers always to names earlier in the packet?
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: Wed, 24 Oct 2018 13:39:01 -0000

On 24 Oct 2018, at 10:01, Viktor Dukhovni wrote:

> My reading of RFC 1035 is that DNS name "compression"
> via "pointers" is restricted to name strictly earlier
> in the DNS message:
>
>    4.1.4. Message compression
>
>    In order to reduce the size of messages, the domain system utilizes 
> a
>    compression scheme which eliminates the repetition of domain names 
> in a
>    message.  In this scheme, an entire domain name or a list of labels 
> at
>    the end of a domain name is replaced with a pointer to a prior 
> occurance
>                                                             ---------------
>    of the same name.
>

Not strictly to do with loops but we noticed that not all nameservers 
use the same compression algorithm. See section 9.1 and appendix B of 
https://datatracker.ietf.org/doc/draft-ietf-dnsop-dns-capture-format

John
> And yet, here and there I see mention of having to take care to avoid 
> "loops",
> but loops are impossible in a monotone strictly decreasing sequence.
>
> Is there a later RFC that relaxes the constraint and allows pointers 
> to names
> later in the message?  I'm having a bit of trouble finding the later 
> text...
>
> Secondarily, can the pointer point to some odd-ball location earlier 
> in the
> message that is not semantically a label in its original context, but 
> just
> happens to carry data that decodes as the desired label?  Or, are 
> pointers
> only valid to prior locations that are corresponding labels in their 
> original
> context?
>
> -- 
> 	Viktor.
>
> _______________________________________________
> DNSOP mailing list
> DNSOP@ietf.org
> https://www.ietf.org/mailman/listinfo/dnsop


John Dickinson

http://sinodun.com

Sinodun Internet Technologies Ltd.
Magdalen Centre
Oxford Science Park
Robert Robinson Avenue
Oxford OX4 4GA
U.K.