mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Fixed rebinding protection bug when using forwarder setups
BIND wasn't honoring option "deny-answer-aliases" when configured to forward queries. Before the fix it was possible for nameservers listed in "forwarders" option to return CNAME answers pointing to unrelated domains of the original query, which could be used as a vector for rebinding attacks. The fix ensures that BIND apply filters even if configured as a forwarder instance.
This commit is contained in:
parent
2650ff19c7
commit
6da142ff7f
1 changed files with 7 additions and 1 deletions
|
|
@ -6985,9 +6985,15 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
|
|||
|
||||
/*
|
||||
* If the target name is a subdomain of the search domain, allow it.
|
||||
*
|
||||
* Note that if BIND is configured as a forwarding DNS server, the
|
||||
* search domain will always match the root domain ("."), so we
|
||||
* must also check whether forwarding is enabled so that filters
|
||||
* can be applied; see GL #1574.
|
||||
*/
|
||||
if (dns_name_issubdomain(tname, &fctx->domain))
|
||||
if (!fctx->forwarding && dns_name_issubdomain(tname, &fctx->domain)) {
|
||||
return (true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise, apply filters.
|
||||
|
|
|
|||
Loading…
Reference in a new issue