From: Mukund Sivaraman Date: Tue, 23 Feb 2016 07:21:34 +0000 (+0530) Subject: Fix allocation for "none" ACL that caused assertion failure (#41745) X-Git-Tag: v9.11.0a1~106 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=293a9e997803ebcf4e6ade8c972465bf6330f534;p=thirdparty%2Fbind9.git Fix allocation for "none" ACL that caused assertion failure (#41745) --- diff --git a/CHANGES b/CHANGES index 5e43e1e105c..325b5fd45d2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +4320. [bug] Insufficient memory allocation when handling + "none" ACL could cause an assertion failure in + named when parsing ACL configuration. [RT #41745] + 4319. [security] Fix resolver assertion failure due to improper DNAME handling when parsing fetch reply messages. (CVE-2016-1286) [RT #41753] diff --git a/bin/tests/system/checkconf/good-acl.conf b/bin/tests/system/checkconf/good-acl.conf new file mode 100644 index 00000000000..84ff712c367 --- /dev/null +++ b/bin/tests/system/checkconf/good-acl.conf @@ -0,0 +1,8 @@ +acl a { + { "none"; }; + { !19.0.0.0/0; }; +}; + +options { + allow-query { a; }; +}; diff --git a/lib/isccfg/aclconf.c b/lib/isccfg/aclconf.c index cce55299ef1..ba54e84c667 100644 --- a/lib/isccfg/aclconf.c +++ b/lib/isccfg/aclconf.c @@ -273,10 +273,11 @@ count_acl_elements(const cfg_obj_t *caml, const cfg_obj_t *cctx, } else if (cfg_obj_isstring(ce)) { const char *name = cfg_obj_asstring(ce); if (strcasecmp(name, "localhost") == 0 || - strcasecmp(name, "localnets") == 0) { + strcasecmp(name, "localnets") == 0 || + strcasecmp(name, "none") == 0) + { n++; - } else if (strcasecmp(name, "any") != 0 && - strcasecmp(name, "none") != 0) { + } else if (strcasecmp(name, "any") != 0) { dns_acl_t *inneracl = NULL; /* * Convert any named acls we reference now if