bind9/lib
Matthijs Mekking 96953fc293
Fix servestale fetchlimits crash
When we query the resolver for a domain name that is in the same zone
for which is already one or more fetches outstanding, we could
potentially hit the fetch limits. If so, recursion fails immediately
for the incoming query and if serve-stale is enabled, we may try to
return a stale answer.

If the resolver is also is authoritative for the parent zone (for
example the root zone), first a delegation is found, but we first
check the cache for a better response.

Nothing is found in the cache, so we try to recurse to find the
answer to the query.

Because of fetch-limits 'dns_resolver_createfetch()' returns an error,
which 'ns_query_recurse()' propagates to the caller,
'query_delegation_recurse()'.

Because serve-stale is enabled, 'query_usestale()' is called,
setting 'qctx->db' to the cache db, but leaving 'qctx->version'
untouched. Now 'query_lookup()' is called to search for stale data
in the cache database with a non-NULL 'qctx->version'
(which is set to a zone db version), and thus we hit an assertion
in rbtdb.

This crash was introduced in 'v9_16' by commit
2afaff75ed.

(cherry picked from commit 87591de6f7)
2021-03-11 13:47:20 +01:00
..
bind9 Stop including dnstap headers from <dns/dnstap.h> 2021-02-16 12:08:21 +11:00
dns fix automatic journal upgrade on windows 2021-03-08 09:43:00 +01:00
irs Use BIND 9.17 preprocessor macro to skip unit test 2021-02-17 12:09:25 +01:00
isc Assigning uint64_t from buffer might be misaligned in netmgr tests 2021-03-04 15:29:44 +01:00
isccc Use BIND 9.17 preprocessor macro to skip unit test 2021-02-17 12:09:25 +01:00
isccfg Add purge-keys config option 2021-02-23 09:18:55 +01:00
ns Fix servestale fetchlimits crash 2021-03-11 13:47:20 +01:00
samples Add libssl libraries to Windows build 2020-12-09 10:46:16 +01:00
win32/bindevt update all copyright headers to eliminate the typo 2020-09-14 16:50:58 -07:00
.gitignore added gitignore, removed cvsignore 2012-03-03 23:10:05 -08:00
Kyuafile link in lib/isccc/tests/Kyuafile 2018-11-13 07:23:36 +11:00
Makefile.in remove lib/tests as nothing uses it anymore 2018-03-09 14:12:50 -08:00