]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add shutdown checks in dns_catz_dbupdate_callback()
authorAram Sargsyan <aram@isc.org>
Tue, 4 Jul 2023 08:38:39 +0000 (08:38 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 6 Jul 2023 10:46:46 +0000 (10:46 +0000)
commit28bb419edcaaaaeea67e4332de8aea0078adf3d7
tree6bb3f855bb9c6d9b0435c56595da4acfcb368093
parent2f6641068029b16cb7068b6fa67087e0a1803363
Add shutdown checks in dns_catz_dbupdate_callback()

When a zone database update callback is called, the 'catzs' object,
extracted from the callback argument, might be already shutting down,
in which case the 'catzs->zones' can be NULL and cause an assertion
failure when calling isc_ht_find().

Add an early return from the callback if 'catzs->shuttingdown' is true.

Also check the validity of 'catzs->zones' after locking 'catzs' in
case there is a race with dns_catz_shutdown_catzs() running in another
thread.
lib/dns/catz.c