mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
If a fetch with sigrdataset==NULL joined one with sigrdataset!=NULL
or vice versa, the resolver could catch an assertion or lose signature data, respectively.
This commit is contained in:
parent
b61bbad878
commit
3ae7579332
5
CHANGES
5
CHANGES
@ -1,3 +1,8 @@
|
|||||||
|
54. [bug] If a fetch with sigrdataset==NULL joined one with
|
||||||
|
sigrdataset!=NULL or vice versa, the resolver
|
||||||
|
could catch an assertion or lose signature data,
|
||||||
|
respectively.
|
||||||
|
|
||||||
53. [port] freebsd 4.0: lib/isc/unix/socket.c requires
|
53. [port] freebsd 4.0: lib/isc/unix/socket.c requires
|
||||||
<sys/param.h>.
|
<sys/param.h>.
|
||||||
|
|
||||||
|
@ -1795,8 +1795,15 @@ fctx_join(fetchctx_t *fctx, isc_task_t *task, isc_taskaction_t action,
|
|||||||
event->sigrdataset = sigrdataset;
|
event->sigrdataset = sigrdataset;
|
||||||
event->fetch = fetch;
|
event->fetch = fetch;
|
||||||
dns_fixedname_init(&event->foundname);
|
dns_fixedname_init(&event->foundname);
|
||||||
ISC_LIST_APPEND(fctx->events, event, link);
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Make sure that we can store the sigrdataset in the
|
||||||
|
* first event if it is needed by any of the events.
|
||||||
|
*/
|
||||||
|
if (event->sigrdataset != NULL)
|
||||||
|
ISC_LIST_PREPEND(fctx->events, event, link);
|
||||||
|
else
|
||||||
|
ISC_LIST_APPEND(fctx->events, event, link);
|
||||||
fctx->references++;
|
fctx->references++;
|
||||||
|
|
||||||
fetch->magic = DNS_FETCH_MAGIC;
|
fetch->magic = DNS_FETCH_MAGIC;
|
||||||
@ -2041,11 +2048,15 @@ clone_results(fetchctx_t *fctx) {
|
|||||||
event->result = hevent->result;
|
event->result = hevent->result;
|
||||||
dns_db_attach(hevent->db, &event->db);
|
dns_db_attach(hevent->db, &event->db);
|
||||||
dns_db_attachnode(hevent->db, hevent->node, &event->node);
|
dns_db_attachnode(hevent->db, hevent->node, &event->node);
|
||||||
if (hevent->rdataset != NULL &&
|
INSIST(hevent->rdataset != NULL);
|
||||||
dns_rdataset_isassociated(hevent->rdataset))
|
INSIST(event->rdataset != NULL);
|
||||||
|
if (dns_rdataset_isassociated(hevent->rdataset))
|
||||||
dns_rdataset_clone(hevent->rdataset, event->rdataset);
|
dns_rdataset_clone(hevent->rdataset, event->rdataset);
|
||||||
|
INSIST(! (hevent->sigrdataset == NULL &&
|
||||||
|
event->sigrdataset != NULL));
|
||||||
if (hevent->sigrdataset != NULL &&
|
if (hevent->sigrdataset != NULL &&
|
||||||
dns_rdataset_isassociated(hevent->sigrdataset))
|
dns_rdataset_isassociated(hevent->sigrdataset) &&
|
||||||
|
event->sigrdataset != NULL)
|
||||||
dns_rdataset_clone(hevent->sigrdataset,
|
dns_rdataset_clone(hevent->sigrdataset,
|
||||||
event->sigrdataset);
|
event->sigrdataset);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user