behavior of k.root-servers.net

Erik Rozendaal erik at NLnetLabs.nl
Thu Jul 17 11:54:07 CEST 2003


Erik Rozendaal wrote:
> Yasuhiro Orange Morishita wrote:
> 
>> Hello NSD folks,
>>
>> My name is Yasuhiro Orange Morishita at JPRS.
>>
>> I found strange behavior on k.root-servers.net as described below.
> 
> 
> Thanks.  I'll take a look at this.

Ok.  I've opened a bug about this: 
<URL:http://www.nlnetlabs.nl/bugs/show_bug.cgi?id=59>.  The attached patch 
fixes this problem for NSD 1.2.0 (and the just released 1.2.1 which does 
not include this patch).

Erik
-------------- next part --------------
Index: query.c
===================================================================
RCS file: /cvs/nsd/query.c,v
retrieving revision 1.125
diff -u -r1.125 query.c
--- query.c	7 Jul 2003 12:59:37 -0000	1.125
+++ query.c	17 Jul 2003 08:46:26 -0000
@@ -356,8 +356,10 @@
 		 * in question dname or the domain name is longer than
 		 * MAXDOMAINLEN ...
 		 */
-		if ((*src & 0xc0) || (src + *src > query->iobufptr) || 
-		    ((src - query->iobuf + *src) > MAXDOMAINLEN)) {
+		if ((*src & 0xc0) ||
+		    (src + *src + 1 > query->iobufptr) || 
+		    (src + *src + 1 > query_name + MAXDOMAINLEN))
+		{
 			query_formerr(query);
 			return NULL;
 		}


More information about the nsd-users mailing list