Commit 00112618 authored by Mark Andrews's avatar Mark Andrews
Browse files

3687. [bug] Address null pointer dereference in zone_xfrdone.

                        [RT #35042]
parent e80c7005
3687. [bug] Address null pointer dereference in zone_xfrdone.
[RT #35042]
3686. [func] "dnssec-signzone -Q" drops signatures from keys 3686. [func] "dnssec-signzone -Q" drops signatures from keys
that are still published but no longer active. that are still published but no longer active.
[RT #34990] [RT #34990]
......
...@@ -11856,6 +11856,12 @@ zone_shutdown(isc_task_t *task, isc_event_t *event) { ...@@ -11856,6 +11856,12 @@ zone_shutdown(isc_task_t *task, isc_event_t *event) {
linked = ISC_TRUE; linked = ISC_TRUE;
zone->statelist = NULL; zone->statelist = NULL;
} }
if (zone->statelist == &zone->zmgr->xfrin_in_progress) {
ISC_LIST_UNLINK(zone->zmgr->xfrin_in_progress, zone,
statelink);
zone->statelist = NULL;
zmgr_resume_xfrs(zone->zmgr, ISC_FALSE);
}
RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write); RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
} }
...@@ -14330,13 +14336,16 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) { ...@@ -14330,13 +14336,16 @@ zone_xfrdone(dns_zone_t *zone, isc_result_t result) {
* This transfer finishing freed up a transfer quota slot. * This transfer finishing freed up a transfer quota slot.
* Let any other zones waiting for quota have it. * Let any other zones waiting for quota have it.
*/ */
UNLOCK_ZONE(zone); if (zone->zmgr != NULL &&
RWLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write); zone->statelist == &zone->zmgr->xfrin_in_progress) {
ISC_LIST_UNLINK(zone->zmgr->xfrin_in_progress, zone, statelink); UNLOCK_ZONE(zone);
zone->statelist = NULL; RWLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
zmgr_resume_xfrs(zone->zmgr, ISC_FALSE); ISC_LIST_UNLINK(zone->zmgr->xfrin_in_progress, zone, statelink);
RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write); zone->statelist = NULL;
LOCK_ZONE(zone); zmgr_resume_xfrs(zone->zmgr, ISC_FALSE);
RWUNLOCK(&zone->zmgr->rwlock, isc_rwlocktype_write);
LOCK_ZONE(zone);
}
/* /*
* Retry with a different server if necessary. * Retry with a different server if necessary.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment