BIND 9.2.1 patch, multiple RR's for singleton types.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With the release of the libbind buffer overflow a number of people have
suggested loading a copy of BIND locally and pointing your local resolver
at just that name server, providing a sanity check of all incoming DNS
traffic.  For the most part this will work, however, for it to work
effectively you must be using BIND 9.x because BIND 8.x does not
reconstruct all responses before forwarding them on.

For more information on the libbind buffer overflow bug please see:
http://www.cert.org/advisories/CA-2002-19.html

However, your situation may preclude you from running BIND 9 either locally
or at the site level.  One such situation would be that you are already
running BIND 8 and you have zones loaded that will not load in to BIND 9
because they have multiple resource records assigned to one singleton data
type.  For example, an A record pointing to a list of CNAMES:

	fuzzy	IN	CNAME	www.snuggie.com.
		IN	CNAME	www.r-9.net.

Normally BIND 9 would reject this as part of a zone.

To overcome this particular problem I have produced the attached patch(1)
to BIND 9.2.1 which, when applied, will again allow you to use multiple
CNAMEs etc. on one RR.  This patch is the equivalent of the 'multiple-cnames
yes;' option in bind 8.x.

WARNING!!  Although I am running this patch in a production environment
I cannot guarantee that this patch will work for you.  Please be sure to
double check the functionality of this patch before employing it in any
environment!!

-- 
Tim Gladding
--- bind-9.2.1/lib/dns/rdataslab.c.orig	Tue Jan  9 16:51:25 2001
+++ bind-9.2.1/lib/dns/rdataslab.c	Mon Jul  1 22:49:19 2002
@@ -111,14 +111,14 @@
 	/*
 	 * Ensure that singleton types are actually singletons.
 	 */
-	if (nitems > 1 && dns_rdatatype_issingleton(rdataset->type)) {
+	/* if (nitems > 1 && dns_rdatatype_issingleton(rdataset->type)) { */
 		/*
 		 * We have a singleton type, but there's more than one
 		 * RR in the rdataset.
 		 */
-		result = DNS_R_SINGLETON;
+		/* result = DNS_R_SINGLETON;
 		goto free_rdatas;
-	}
+	} */
 
 	/*
 	 * Allocate the memory, set up a buffer, start copying in
@@ -310,13 +310,13 @@
 	/*
 	 * Ensure that singleton types are actually singletons.
 	 */
-	if (tcount > 1 && dns_rdatatype_issingleton(type)) {
+	/* if (tcount > 1 && dns_rdatatype_issingleton(type)) { */
 		/*
 		 * We have a singleton type, but there's more than one
 		 * RR in the rdataset.
 		 */
-		return (DNS_R_SINGLETON);
-	}
+		/* return (DNS_R_SINGLETON);
+	} */
 
 	/*
 	 * Copy the reserved area from the new slab.

[Index of Archives]     [Linux Security]     [Netfilter]     [PHP]     [Yosemite News]     [Linux Kernel]

  Powered by Linux