From: Evan Hunt Date: Tue, 4 Jun 2013 18:24:57 +0000 (-0700) Subject: [v9_9_3_patch] assertion failure in resolver.c X-Git-Tag: v9.9.3-P1^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58d2f2e260133da87589aaebfb5ce5dea83188ee;p=thirdparty%2Fbind9.git [v9_9_3_patch] assertion failure in resolver.c 3584. [security] Caching data from an incompletely signed zone could trigger an assertion failure in resolver.c [RT #33690] (cherry picked from commit 276457f7a38f56a5f762238ab89bb45e27948af6) --- diff --git a/CHANGES b/CHANGES index 5032e75f1ab..7eb60ad61fc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ + --- 9.9.3-P1 released --- + +3584. [security] Caching data from an incompletely signed zone could + trigger an assertion failure in resolver.c [RT #33690] + --- 9.9.3 released --- 3568. [cleanup] Add a product description line to the version file, diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 10d1f75f12b..27d15b9329c 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -4395,7 +4395,7 @@ fctx_log(void *arg, int level, const char *fmt, ...) { static inline isc_result_t findnoqname(fetchctx_t *fctx, dns_name_t *name, dns_rdatatype_t type, - dns_name_t **noqname) + dns_name_t **noqnamep) { dns_rdataset_t *nrdataset, *next, *sigrdataset; dns_rdata_rrsig_t rrsig; @@ -4408,10 +4408,12 @@ findnoqname(fetchctx_t *fctx, dns_name_t *name, dns_rdatatype_t type, dns_fixedname_t fclosest; dns_name_t *nearest; dns_fixedname_t fnearest; + dns_rdatatype_t found = dns_rdatatype_none; + dns_name_t *noqname = NULL; FCTXTRACE("findnoqname"); - REQUIRE(noqname != NULL && *noqname == NULL); + REQUIRE(noqnamep != NULL && *noqnamep == NULL); /* * Find the SIG for this rdataset, if we have it. @@ -4480,8 +4482,10 @@ findnoqname(fetchctx_t *fctx, dns_name_t *name, dns_rdatatype_t type, &data, NULL, fctx_log, fctx))) { - if (!exists) - *noqname = nsec; + if (!exists) { + noqname = nsec; + found = dns_rdatatype_nsec; + } } if (nrdataset->type == dns_rdatatype_nsec3 && @@ -4494,13 +4498,26 @@ findnoqname(fetchctx_t *fctx, dns_name_t *name, dns_rdatatype_t type, closest, nearest, fctx_log, fctx))) { - if (!exists && setnearest) - *noqname = nsec; + if (!exists && setnearest) { + noqname = nsec; + found = dns_rdatatype_nsec3; + } } } } if (result == ISC_R_NOMORE) result = ISC_R_SUCCESS; + if (noqname != NULL) { + for (sigrdataset = ISC_LIST_HEAD(noqname->list); + sigrdataset != NULL; + sigrdataset = ISC_LIST_NEXT(sigrdataset, link)) { + if (sigrdataset->type == dns_rdatatype_rrsig && + sigrdataset->covers == found) + break; + } + if (sigrdataset != NULL) + *noqnamep = noqname; + } return (result); } diff --git a/version b/version index 52ab156f8bd..3761bb5427c 100644 --- a/version +++ b/version @@ -8,5 +8,5 @@ DESCRIPTION="(Extended Support Version)" MAJORVER=9 MINORVER=9 PATCHVER=3 -RELEASETYPE= -RELEASEVER= +RELEASETYPE=-P +RELEASEVER=1