components/bind/patches/006-RT9857.patch
changeset 6227 a498cb624014
parent 6226 cebcbbd80341
child 6228 37f9819bc49d
equal deleted inserted replaced
6226:cebcbbd80341 6227:a498cb624014
     1 This patch was derived from ISC source differences between
       
     2 bind-9.9.8-p3 and bind-9.9.8-p4
       
     3 
       
     4 diff -r e13d04281504 CHANGES
       
     5 --- a/CHANGES	Thu Mar 03 13:53:44 2016 +0000
       
     6 +++ b/CHANGES	Fri Mar 04 12:27:21 2016 +0000
       
     7 @@ -1,3 +1,12 @@
       
     8 +	--- 9.6-ESV-R11-P6 released ---
       
     9 +
       
    10 +4319.	[security]	Fix resolver assertion failure due to improper
       
    11 +			DNAME handling when parsing fetch reply messages.
       
    12 +			(CVE-2016-1286) [RT #41753]
       
    13 +
       
    14 +4318.	[security]	Malformed control messages can trigger assertions
       
    15 +			in named and rndc. (CVE-2016-1285) [RT #41666]
       
    16 +
       
    17  	--- 9.6-ESV-R11-P5 released ---
       
    18  
       
    19  4285.	[security]	Specific APL data could trigger a INSIST.
       
    20 diff -r e13d04281504 bin/named/control.c
       
    21 --- a/bin/named/control.c	Thu Mar 03 13:53:44 2016 +0000
       
    22 +++ b/bin/named/control.c	Fri Mar 04 12:27:21 2016 +0000
       
    23 @@ -1,5 +1,5 @@
       
    24  /*
       
    25 - * Copyright (C) 2004-2007, 2009, 2010, 2012  Internet Systems Consortium, Inc. ("ISC")
       
    26 + * Copyright (C) 2004-2007, 2009-2016  Internet Systems Consortium, Inc. ("ISC")
       
    27   * Copyright (C) 2001-2003  Internet Software Consortium.
       
    28   *
       
    29   * Permission to use, copy, modify, and/or distribute this software for any
       
    30 @@ -69,7 +69,7 @@
       
    31  #endif
       
    32  
       
    33  	data = isccc_alist_lookup(message, "_data");
       
    34 -	if (data == NULL) {
       
    35 +	if (!isccc_alist_alistp(data)) {
       
    36  		/*
       
    37  		 * No data section.
       
    38  		 */
       
    39 diff -r e13d04281504 bin/named/controlconf.c
       
    40 --- a/bin/named/controlconf.c	Thu Mar 03 13:53:44 2016 +0000
       
    41 +++ b/bin/named/controlconf.c	Fri Mar 04 12:27:21 2016 +0000
       
    42 @@ -1,5 +1,5 @@
       
    43  /*
       
    44 - * Copyright (C) 2004-2008, 2011-2014  Internet Systems Consortium, Inc. ("ISC")
       
    45 + * Copyright (C) 2004-2008, 2011-2014, 2016  Internet Systems Consortium, Inc. ("ISC")
       
    46   * Copyright (C) 2001-2003  Internet Software Consortium.
       
    47   *
       
    48   * Permission to use, copy, modify, and/or distribute this software for any
       
    49 @@ -396,7 +396,7 @@
       
    50  	 * Limit exposure to replay attacks.
       
    51  	 */
       
    52  	_ctrl = isccc_alist_lookup(request, "_ctrl");
       
    53 -	if (_ctrl == NULL) {
       
    54 +	if (!isccc_alist_alistp(_ctrl)) {
       
    55  		log_invalid(&conn->ccmsg, ISC_R_FAILURE);
       
    56  		goto cleanup_request;
       
    57  	}
       
    58 diff -r e13d04281504 bin/rndc/rndc.c
       
    59 --- a/bin/rndc/rndc.c	Thu Mar 03 13:53:44 2016 +0000
       
    60 +++ b/bin/rndc/rndc.c	Fri Mar 04 12:27:21 2016 +0000
       
    61 @@ -1,5 +1,5 @@
       
    62  /*
       
    63 - * Copyright (C) 2004-2009, 2011-2014  Internet Systems Consortium, Inc. ("ISC")
       
    64 + * Copyright (C) 2004-2016  Internet Systems Consortium, Inc. ("ISC")
       
    65   * Copyright (C) 2000-2003  Internet Software Consortium.
       
    66   *
       
    67   * Permission to use, copy, modify, and/or distribute this software for any
       
    68 @@ -220,8 +220,8 @@
       
    69  	DO("parse message", isccc_cc_fromwire(&source, &response, &secret));
       
    70  
       
    71  	data = isccc_alist_lookup(response, "_data");
       
    72 -	if (data == NULL)
       
    73 -		fatal("no data section in response");
       
    74 +	if (!isccc_alist_alistp(data))
       
    75 +		fatal("bad or missing data section in response");
       
    76  	result = isccc_cc_lookupstring(data, "err", &errormsg);
       
    77  	if (result == ISC_R_SUCCESS) {
       
    78  		failed = ISC_TRUE;
       
    79 @@ -283,8 +283,8 @@
       
    80  	DO("parse message", isccc_cc_fromwire(&source, &response, &secret));
       
    81  
       
    82  	_ctrl = isccc_alist_lookup(response, "_ctrl");
       
    83 -	if (_ctrl == NULL)
       
    84 -		fatal("_ctrl section missing");
       
    85 +	if (!isccc_alist_alistp(_ctrl))
       
    86 +		fatal("bad or missing ctrl section in response");
       
    87  	nonce = 0;
       
    88  	if (isccc_cc_lookupuint32(_ctrl, "_nonce", &nonce) != ISC_R_SUCCESS)
       
    89  		nonce = 0;
       
    90 diff -r e13d04281504 lib/dns/resolver.c
       
    91 --- a/lib/dns/resolver.c	Thu Mar 03 13:53:44 2016 +0000
       
    92 +++ b/lib/dns/resolver.c	Fri Mar 04 12:27:21 2016 +0000
       
    93 @@ -5364,21 +5364,17 @@
       
    94  }
       
    95  
       
    96  static inline isc_result_t
       
    97 -dname_target(dns_rdataset_t *rdataset, dns_name_t *qname, dns_name_t *oname,
       
    98 -	     dns_fixedname_t *fixeddname)
       
    99 +dname_target(dns_rdataset_t *rdataset, dns_name_t *qname,
       
   100 +	     unsigned int nlabels, dns_fixedname_t *fixeddname)
       
   101  {
       
   102  	isc_result_t result;
       
   103  	dns_rdata_t rdata = DNS_RDATA_INIT;
       
   104 -	unsigned int nlabels;
       
   105 -	int order;
       
   106 -	dns_namereln_t namereln;
       
   107  	dns_rdata_dname_t dname;
       
   108  	dns_fixedname_t prefix;
       
   109  
       
   110  	/*
       
   111  	 * Get the target name of the DNAME.
       
   112  	 */
       
   113 -
       
   114  	result = dns_rdataset_first(rdataset);
       
   115  	if (result != ISC_R_SUCCESS)
       
   116  		return (result);
       
   117 @@ -5387,14 +5383,6 @@
       
   118  	if (result != ISC_R_SUCCESS)
       
   119  		return (result);
       
   120  
       
   121 -	/*
       
   122 -	 * Get the prefix of qname.
       
   123 -	 */
       
   124 -	namereln = dns_name_fullcompare(qname, oname, &order, &nlabels);
       
   125 -	if (namereln != dns_namereln_subdomain) {
       
   126 -		dns_rdata_freestruct(&dname);
       
   127 -		return (DNS_R_FORMERR);
       
   128 -	}
       
   129  	dns_fixedname_init(&prefix);
       
   130  	dns_name_split(qname, nlabels, dns_fixedname_name(&prefix), NULL);
       
   131  	dns_fixedname_init(fixeddname);
       
   132 @@ -5789,13 +5777,13 @@
       
   133  answer_response(fetchctx_t *fctx) {
       
   134  	isc_result_t result;
       
   135  	dns_message_t *message;
       
   136 -	dns_name_t *name, *qname, tname, *ns_name;
       
   137 +	dns_name_t *name, *dname = NULL, *qname, tname, *ns_name;
       
   138  	dns_rdataset_t *rdataset, *ns_rdataset;
       
   139  	isc_boolean_t done, external, chaining, aa, found, want_chaining;
       
   140  	isc_boolean_t have_answer, found_cname, found_type, wanted_chaining;
       
   141  	unsigned int aflag;
       
   142  	dns_rdatatype_t type;
       
   143 -	dns_fixedname_t dname, fqname;
       
   144 +	dns_fixedname_t fdname, fqname;
       
   145  
       
   146  	FCTXTRACE("answer_response");
       
   147  
       
   148 @@ -5821,10 +5809,15 @@
       
   149  	type = fctx->type;
       
   150  	result = dns_message_firstname(message, DNS_SECTION_ANSWER);
       
   151  	while (!done && result == ISC_R_SUCCESS) {
       
   152 +		dns_namereln_t namereln;
       
   153 +		int order;
       
   154 +		unsigned int nlabels;
       
   155 +
       
   156  		name = NULL;
       
   157  		dns_message_currentname(message, DNS_SECTION_ANSWER, &name);
       
   158  		external = ISC_TF(!dns_name_issubdomain(name, &fctx->domain));
       
   159 -		if (dns_name_equal(name, qname)) {
       
   160 +		namereln = dns_name_fullcompare(qname, name, &order, &nlabels);
       
   161 +		if (namereln == dns_namereln_equal) {
       
   162  			wanted_chaining = ISC_FALSE;
       
   163  			for (rdataset = ISC_LIST_HEAD(name->list);
       
   164  			     rdataset != NULL;
       
   165 @@ -5837,6 +5830,10 @@
       
   166  					 * NSEC3 records are not allowed to
       
   167  					 * appear in the answer section.
       
   168  					 */
       
   169 +					isc_log_write(dns_lctx,
       
   170 +					    DNS_LOGCATEGORY_RESOLVER,
       
   171 +					    DNS_LOGMODULE_RESOLVER,
       
   172 +					    ISC_LOG_NOTICE, "NSEC3 in answer");
       
   173  					return (DNS_R_FORMERR);
       
   174  				}
       
   175  				if (rdataset->type == type && !found_cname) {
       
   176 @@ -5878,8 +5875,18 @@
       
   177  					 */
       
   178  					if (type == dns_rdatatype_rrsig ||
       
   179  					    type == dns_rdatatype_key ||
       
   180 -					    type == dns_rdatatype_nsec)
       
   181 +					    type == dns_rdatatype_nsec) {
       
   182 +						char buf[DNS_RDATATYPE_FORMATSIZE];
       
   183 +						dns_rdatatype_format(fctx->type,
       
   184 +							      buf, sizeof(buf));
       
   185 +						isc_log_write(dns_lctx,
       
   186 +						    DNS_LOGCATEGORY_RESOLVER,
       
   187 +						    DNS_LOGMODULE_RESOLVER,
       
   188 +						    ISC_LOG_NOTICE,
       
   189 +						    "CNAME response "
       
   190 +						    "for %s RR", buf);
       
   191  						return (DNS_R_FORMERR);
       
   192 +					}
       
   193  					found = ISC_TRUE;
       
   194  					found_cname = ISC_TRUE;
       
   195  					want_chaining = ISC_TRUE;
       
   196 @@ -5921,10 +5928,11 @@
       
   197  						 */
       
   198  						INSIST(!external);
       
   199  						if (aflag ==
       
   200 -						    DNS_RDATASETATTR_ANSWER)
       
   201 +						    DNS_RDATASETATTR_ANSWER) {
       
   202  							have_answer = ISC_TRUE;
       
   203 -						name->attributes |=
       
   204 -							DNS_NAMEATTR_ANSWER;
       
   205 +							name->attributes |=
       
   206 +								DNS_NAMEATTR_ANSWER;
       
   207 +						}
       
   208  						rdataset->attributes |= aflag;
       
   209  						if (aa)
       
   210  							rdataset->trust =
       
   211 @@ -5979,6 +5987,8 @@
       
   212  			if (wanted_chaining)
       
   213  				chaining = ISC_TRUE;
       
   214  		} else {
       
   215 +			dns_rdataset_t *dnameset = NULL;
       
   216 +
       
   217  			/*
       
   218  			 * Look for a DNAME (or its SIG).  Anything else is
       
   219  			 * ignored.
       
   220 @@ -5986,27 +5996,64 @@
       
   221  			wanted_chaining = ISC_FALSE;
       
   222  			for (rdataset = ISC_LIST_HEAD(name->list);
       
   223  			     rdataset != NULL;
       
   224 -			     rdataset = ISC_LIST_NEXT(rdataset, link)) {
       
   225 -				isc_boolean_t found_dname = ISC_FALSE;
       
   226 -				found = ISC_FALSE;
       
   227 +			     rdataset = ISC_LIST_NEXT(rdataset, link))
       
   228 +			{
       
   229 +				/*
       
   230 +				 * Only pass DNAME or RRSIG(DNAME).
       
   231 +				 */
       
   232 +				if (rdataset->type != dns_rdatatype_dname &&
       
   233 +				    (rdataset->type != dns_rdatatype_rrsig ||
       
   234 +				     rdataset->covers != dns_rdatatype_dname))
       
   235 +					continue;
       
   236 +
       
   237 +				/*
       
   238 +				 * If we're not chaining, then the DNAME and
       
   239 +				 * its signature should not be external.
       
   240 +				 */
       
   241 +				if (!chaining && external) {
       
   242 +					char qbuf[DNS_NAME_FORMATSIZE];
       
   243 +					char obuf[DNS_NAME_FORMATSIZE];
       
   244 +
       
   245 +					dns_name_format(name, qbuf,
       
   246 +							sizeof(qbuf));
       
   247 +					dns_name_format(&fctx->domain, obuf,
       
   248 +							sizeof(obuf));
       
   249 +					isc_log_write(dns_lctx,
       
   250 +					    DNS_LOGCATEGORY_RESOLVER,
       
   251 +					    DNS_LOGMODULE_RESOLVER,
       
   252 +					    ISC_LOG_NOTICE,
       
   253 +					    "external DNAME or "
       
   254 +					    "RRSIG covering DNAME "
       
   255 +					    "in answer: %s is "
       
   256 +					    "not in %s", qbuf, obuf);
       
   257 +					return (DNS_R_FORMERR);
       
   258 +				}
       
   259 +
       
   260 +				if (namereln != dns_namereln_subdomain) {
       
   261 +					char qbuf[DNS_NAME_FORMATSIZE];
       
   262 +					char obuf[DNS_NAME_FORMATSIZE];
       
   263 +
       
   264 +					dns_name_format(qname, qbuf,
       
   265 +							sizeof(qbuf));
       
   266 +					dns_name_format(name, obuf,
       
   267 +							sizeof(obuf));
       
   268 +					isc_log_write(dns_lctx,
       
   269 +					    DNS_LOGCATEGORY_RESOLVER,
       
   270 +					    DNS_LOGMODULE_RESOLVER,
       
   271 +					    ISC_LOG_NOTICE,
       
   272 +					    "unrelated DNAME "
       
   273 +					    "in answer: %s is "
       
   274 +					    "not in %s", qbuf, obuf);
       
   275 +					return (DNS_R_FORMERR);
       
   276 +				}
       
   277 +
       
   278  				aflag = 0;
       
   279  				if (rdataset->type == dns_rdatatype_dname) {
       
   280 -					/*
       
   281 -					 * We're looking for something else,
       
   282 -					 * but we found a DNAME.
       
   283 -					 *
       
   284 -					 * If we're not chaining, then the
       
   285 -					 * DNAME should not be external.
       
   286 -					 */
       
   287 -					if (!chaining && external)
       
   288 -						return (DNS_R_FORMERR);
       
   289 -					found = ISC_TRUE;
       
   290  					want_chaining = ISC_TRUE;
       
   291  					POST(want_chaining);
       
   292  					aflag = DNS_RDATASETATTR_ANSWER;
       
   293 -					result = dname_target(rdataset,
       
   294 -							      qname, name,
       
   295 -							      &dname);
       
   296 +					result = dname_target(rdataset, qname,
       
   297 +							      nlabels, &fdname);
       
   298  					if (result == ISC_R_NOSPACE) {
       
   299  						/*
       
   300  						 * We can't construct the
       
   301 @@ -6018,81 +6065,68 @@
       
   302  					} else if (result != ISC_R_SUCCESS)
       
   303  						return (result);
       
   304  					else
       
   305 -						found_dname = ISC_TRUE;
       
   306 -				} else if (rdataset->type == dns_rdatatype_rrsig
       
   307 -					   && rdataset->covers ==
       
   308 -					   dns_rdatatype_dname) {
       
   309 +						dnameset = rdataset;
       
   310 +
       
   311 +					dname = dns_fixedname_name(&fdname);
       
   312 +				} else {
       
   313  					/*
       
   314  					 * We've found a signature that
       
   315  					 * covers the DNAME.
       
   316  					 */
       
   317 -					found = ISC_TRUE;
       
   318  					aflag = DNS_RDATASETATTR_ANSWERSIG;
       
   319  				}
       
   320  
       
   321 -				if (found) {
       
   322 +				/*
       
   323 +				 * We've found an answer to our
       
   324 +				 * question.
       
   325 +				 */
       
   326 +				name->attributes |= DNS_NAMEATTR_CACHE;
       
   327 +				rdataset->attributes |= DNS_RDATASETATTR_CACHE;
       
   328 +				rdataset->trust = dns_trust_answer;
       
   329 +				if (!chaining) {
       
   330  					/*
       
   331 -					 * We've found an answer to our
       
   332 -					 * question.
       
   333 +					 * This data is "the" answer to
       
   334 +					 * our question only if we're
       
   335 +					 * not chaining.
       
   336  					 */
       
   337 -					name->attributes |=
       
   338 -						DNS_NAMEATTR_CACHE;
       
   339 -					rdataset->attributes |=
       
   340 -						DNS_RDATASETATTR_CACHE;
       
   341 -					rdataset->trust = dns_trust_answer;
       
   342 -					if (!chaining) {
       
   343 -						/*
       
   344 -						 * This data is "the" answer
       
   345 -						 * to our question only if
       
   346 -						 * we're not chaining.
       
   347 -						 */
       
   348 -						INSIST(!external);
       
   349 -						if (aflag ==
       
   350 -						    DNS_RDATASETATTR_ANSWER)
       
   351 -							have_answer = ISC_TRUE;
       
   352 +					INSIST(!external);
       
   353 +					if (aflag == DNS_RDATASETATTR_ANSWER) {
       
   354 +						have_answer = ISC_TRUE;
       
   355  						name->attributes |=
       
   356  							DNS_NAMEATTR_ANSWER;
       
   357 -						rdataset->attributes |= aflag;
       
   358 -						if (aa)
       
   359 -							rdataset->trust =
       
   360 -							  dns_trust_authanswer;
       
   361 -					} else if (external) {
       
   362 -						rdataset->attributes |=
       
   363 -						    DNS_RDATASETATTR_EXTERNAL;
       
   364  					}
       
   365 -
       
   366 -					/*
       
   367 -					 * DNAME chaining.
       
   368 -					 */
       
   369 -					if (found_dname) {
       
   370 -						/*
       
   371 -						 * Copy the dname into the
       
   372 -						 * qname fixed name.
       
   373 -						 *
       
   374 -						 * Although we check for
       
   375 -						 * failure of the copy
       
   376 -						 * operation, in practice it
       
   377 -						 * should never fail since
       
   378 -						 * we already know that the
       
   379 -						 * result fits in a fixedname.
       
   380 -						 */
       
   381 -						dns_fixedname_init(&fqname);
       
   382 -						result = dns_name_copy(
       
   383 -						  dns_fixedname_name(&dname),
       
   384 -						  dns_fixedname_name(&fqname),
       
   385 -						  NULL);
       
   386 -						if (result != ISC_R_SUCCESS)
       
   387 -							return (result);
       
   388 -						wanted_chaining = ISC_TRUE;
       
   389 -						name->attributes |=
       
   390 -							DNS_NAMEATTR_CHAINING;
       
   391 -						rdataset->attributes |=
       
   392 -						    DNS_RDATASETATTR_CHAINING;
       
   393 -						qname = dns_fixedname_name(
       
   394 -								   &fqname);
       
   395 -					}
       
   396 +					rdataset->attributes |= aflag;
       
   397 +					if (aa)
       
   398 +						rdataset->trust =
       
   399 +						  dns_trust_authanswer;
       
   400 +				} else if (external) {
       
   401 +					rdataset->attributes |=
       
   402 +					    DNS_RDATASETATTR_EXTERNAL;
       
   403  				}
       
   404  			}
       
   405 +
       
   406 +			/*
       
   407 +			 * DNAME chaining.
       
   408 +			 */
       
   409 +			if (dnameset != NULL) {
       
   410 +				/*
       
   411 +				 * Copy the dname into the qname fixed name.
       
   412 +				 *
       
   413 +				 * Although we check for failure of the copy
       
   414 +				 * operation, in practice it should never fail
       
   415 +				 * since we already know that the  result fits
       
   416 +				 * in a fixedname.
       
   417 +				 */
       
   418 +				dns_fixedname_init(&fqname);
       
   419 +				qname = dns_fixedname_name(&fqname);
       
   420 +				result = dns_name_copy(dname, qname, NULL);
       
   421 +				if (result != ISC_R_SUCCESS)
       
   422 +					return (result);
       
   423 +				wanted_chaining = ISC_TRUE;
       
   424 +				name->attributes |= DNS_NAMEATTR_CHAINING;
       
   425 +				dnameset->attributes |=
       
   426 +					    DNS_RDATASETATTR_CHAINING;
       
   427 +			}
       
   428  			if (wanted_chaining)
       
   429  				chaining = ISC_TRUE;
       
   430  		}
       
   431 @@ -6106,8 +6140,14 @@
       
   432  	/*
       
   433  	 * We should have found an answer.
       
   434  	 */
       
   435 -	if (!have_answer)
       
   436 +	if (!have_answer) {
       
   437 +		isc_log_write(dns_lctx,
       
   438 +		    DNS_LOGCATEGORY_RESOLVER,
       
   439 +		    DNS_LOGMODULE_RESOLVER,
       
   440 +		    ISC_LOG_NOTICE,
       
   441 +		    "reply has no answer");
       
   442  		return (DNS_R_FORMERR);
       
   443 +	}
       
   444  
       
   445  	/*
       
   446  	 * This response is now potentially cacheable.
       
   447 diff -r e13d04281504 lib/isccc/cc.c
       
   448 --- a/lib/isccc/cc.c	Thu Mar 03 13:53:44 2016 +0000
       
   449 +++ b/lib/isccc/cc.c	Fri Mar 04 12:27:21 2016 +0000
       
   450 @@ -286,10 +286,10 @@
       
   451  	 * Extract digest.
       
   452  	 */
       
   453  	_auth = isccc_alist_lookup(alist, "_auth");
       
   454 -	if (_auth == NULL)
       
   455 +	if (!isccc_alist_alistp(_auth))
       
   456  		return (ISC_R_FAILURE);
       
   457  	hmd5 = isccc_alist_lookup(_auth, "hmd5");
       
   458 -	if (hmd5 == NULL)
       
   459 +	if (!isccc_sexpr_binaryp(hmd5))
       
   460  		return (ISC_R_FAILURE);
       
   461  	/*
       
   462  	 * Compute digest.
       
   463 @@ -543,7 +543,7 @@
       
   464  	REQUIRE(ackp != NULL && *ackp == NULL);
       
   465  
       
   466  	_ctrl = isccc_alist_lookup(message, "_ctrl");
       
   467 -	if (_ctrl == NULL ||
       
   468 +	if (!isccc_alist_alistp(_ctrl) ||
       
   469  	    isccc_cc_lookupuint32(_ctrl, "_ser", &serial) != ISC_R_SUCCESS ||
       
   470  	    isccc_cc_lookupuint32(_ctrl, "_tim", &t) != ISC_R_SUCCESS)
       
   471  		return (ISC_R_FAILURE);
       
   472 @@ -588,7 +588,7 @@
       
   473  	isccc_sexpr_t *_ctrl;
       
   474  
       
   475  	_ctrl = isccc_alist_lookup(message, "_ctrl");
       
   476 -	if (_ctrl == NULL)
       
   477 +	if (!isccc_alist_alistp(_ctrl))
       
   478  		return (ISC_FALSE);
       
   479  	if (isccc_cc_lookupstring(_ctrl, "_ack", NULL) == ISC_R_SUCCESS)
       
   480  		return (ISC_TRUE);
       
   481 @@ -601,7 +601,7 @@
       
   482  	isccc_sexpr_t *_ctrl;
       
   483  
       
   484  	_ctrl = isccc_alist_lookup(message, "_ctrl");
       
   485 -	if (_ctrl == NULL)
       
   486 +	if (!isccc_alist_alistp(_ctrl))
       
   487  		return (ISC_FALSE);
       
   488  	if (isccc_cc_lookupstring(_ctrl, "_rpl", NULL) == ISC_R_SUCCESS)
       
   489  		return (ISC_TRUE);
       
   490 @@ -621,7 +621,7 @@
       
   491  
       
   492  	_ctrl = isccc_alist_lookup(message, "_ctrl");
       
   493  	_data = isccc_alist_lookup(message, "_data");
       
   494 -	if (_ctrl == NULL || _data == NULL ||
       
   495 +	if (!isccc_alist_alistp(_ctrl) || !isccc_alist_alistp(_data) ||
       
   496  	    isccc_cc_lookupuint32(_ctrl, "_ser", &serial) != ISC_R_SUCCESS ||
       
   497  	    isccc_cc_lookupstring(_data, "type", &type) != ISC_R_SUCCESS)
       
   498  		return (ISC_R_FAILURE);
       
   499 @@ -810,7 +810,7 @@
       
   500  	isccc_sexpr_t *_ctrl;
       
   501  
       
   502  	_ctrl = isccc_alist_lookup(message, "_ctrl");
       
   503 -	if (_ctrl == NULL ||
       
   504 +	if (!isccc_alist_alistp(_ctrl) ||
       
   505  	    isccc_cc_lookupstring(_ctrl, "_ser", &_ser) != ISC_R_SUCCESS ||
       
   506  	    isccc_cc_lookupstring(_ctrl, "_tim", &_tim) != ISC_R_SUCCESS)
       
   507  		return (ISC_R_FAILURE);
       
   508 diff -r e13d04281504 version
       
   509 --- a/version	Thu Mar 03 13:53:44 2016 +0000
       
   510 +++ b/version	Fri Mar 04 12:27:21 2016 +0000
       
   511 @@ -10,4 +10,4 @@
       
   512  PATCHVER=
       
   513  RELEASETYPE=-ESV
       
   514  RELEASEVER=-R11
       
   515 -EXTENSIONS=-P5
       
   516 +EXTENSIONS=-P6