]> git.ipfire.org Git - thirdparty/bind9.git/commit
Check whether zone->db is a valid pointer before attaching
authorAram Sargsyan <aram@isc.org>
Thu, 11 May 2023 12:08:13 +0000 (12:08 +0000)
committerAram Sargsyan <aram@isc.org>
Mon, 15 May 2023 12:05:11 +0000 (12:05 +0000)
commit537c2d2c684d5c5d401989d4523b9dc039abbc9d
treeb04681dbbd6fbb6680d94a9f8ef0d2b865ae3c51
parent2f890fd8c7e6984f5174fc8231b7b87e04a52d1a
Check whether zone->db is a valid pointer before attaching

The zone_resigninc() function does not check the validity of
'zone->db', which can crash named if the zone was unloaded earlier,
for example with "rndc delete".

Check that 'zone->db' is not 'NULL' before attaching to it, like
it is done in zone_sign() and zone_nsec3chain() functions, which
can similarly be called by zone maintenance.

(cherry picked from commit fae0930eb84063fc03d711a0c772c58e5b470377)
lib/dns/zone.c