aboutsummaryrefslogtreecommitdiff
path: root/contrib/bind9/bin/named/server.c
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2007-07-25 08:12:36 +0000
committerDoug Barton <dougb@FreeBSD.org>2007-07-25 08:12:36 +0000
commit56a78b52117fceacbf4282cd41826ca9fb72dd07 (patch)
tree5e59e5d349bab1b1962e57d794d1ceb729fa3150 /contrib/bind9/bin/named/server.c
parentc197e4d6789fb9d0dd1fee514ae2aa75f9b7ab6b (diff)
Vendor import of 9.4.1-P1, which has fixes for the following:
1. The default access control lists (acls) are not being correctly set. If not set anyone can make recursive queries and/or query the cache contents. See also: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-2925 2. The DNS query id generation is vulnerable to cryptographic analysis which provides a 1 in 8 chance of guessing the next query id for 50% of the query ids. This can be used to perform cache poisoning by an attacker. This bug only affects outgoing queries, generated by BIND 9 to answer questions as a resolver, or when it is looking up data for internal uses, such as when sending NOTIFYs to slave name servers. All users are encouraged to upgrade. See also: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-2926 Approved by: re (kensmith, implicit)
Notes
Notes: svn path=/vendor/bind9/dist/; revision=171577
Diffstat (limited to 'contrib/bind9/bin/named/server.c')
-rw-r--r--contrib/bind9/bin/named/server.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/contrib/bind9/bin/named/server.c b/contrib/bind9/bin/named/server.c
index 6ae31cb699d0..50f5df445af4 100644
--- a/contrib/bind9/bin/named/server.c
+++ b/contrib/bind9/bin/named/server.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.419.18.49 2006/12/07 05:24:19 marka Exp $ */
+/* $Id: server.c,v 1.419.18.49.12.2 2007/07/09 02:23:16 marka Exp $ */
/*! \file */
@@ -1435,12 +1435,12 @@ configure_view(dns_view_t *view, const cfg_obj_t *config,
view->additionalfromcache = ISC_TRUE;
}
+ /*
+ * Set "allow-query-cache" and "allow-recursion" acls if
+ * configured in named.conf.
+ */
CHECK(configure_view_acl(vconfig, config, "allow-query-cache",
actx, ns_g_mctx, &view->queryacl));
- if (view->queryacl == NULL)
- CHECK(configure_view_acl(NULL, ns_g_defaults,
- "allow-query-cache", actx,
- ns_g_mctx, &view->queryacl));
if (strcmp(view->name, "_bind") != 0)
CHECK(configure_view_acl(vconfig, config, "allow-recursion",
@@ -1460,11 +1460,29 @@ configure_view(dns_view_t *view, const cfg_obj_t *config,
"active%s%s", forview, viewname);
/*
- * Set default "allow-recursion" acl.
+ * "allow-query-cache" inherits from "allow-recursion" if set,
+ * otherwise from "allow-query" if set.
+ * "allow-recursion" inherits from "allow-query-cache" if set,
+ * otherwise from "allow-query" if set.
+ */
+ if (view->queryacl == NULL && view->recursionacl != NULL)
+ dns_acl_attach(view->recursionacl, &view->queryacl);
+ if (view->queryacl == NULL)
+ CHECK(configure_view_acl(vconfig, config, "allow-query",
+ actx, ns_g_mctx, &view->queryacl));
+ if (view->recursionacl == NULL && view->queryacl != NULL)
+ dns_acl_attach(view->queryacl, &view->recursionacl);
+
+ /*
+ * Set default "allow-recursion" and "allow-query-cache" acls.
*/
if (view->recursionacl == NULL && view->recursion)
- CHECK(configure_view_acl(NULL, ns_g_defaults, "allow-recursion",
+ CHECK(configure_view_acl(NULL, ns_g_config, "allow-recursion",
actx, ns_g_mctx, &view->recursionacl));
+ if (view->queryacl == NULL)
+ CHECK(configure_view_acl(NULL, ns_g_config,
+ "allow-query-cache", actx,
+ ns_g_mctx, &view->queryacl));
CHECK(configure_view_acl(vconfig, config, "sortlist",
actx, ns_g_mctx, &view->sortlist));