From: Mark Andrews Date: Tue, 8 Aug 2017 23:51:59 +0000 (+1000) Subject: add comment X-Git-Tag: v9.12.0a1~131^2~6 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=31605091b40fda47d34128ce74499b8565ad8f87;p=thirdparty%2Fbind9.git add comment --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index a00c395db66..8d3df4ecc75 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -6653,6 +6653,14 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) { dns_rdataset_init(&nameservers); bucketnum = fctx->bucketnum; + + /* + * Note: fevent->rdataset must be disassociated and + * isc_event_free(&event) be called before resuming + * processing of the 'fctx' to prevent use-after-free. + * 'fevent' is set to NULL so as to not have a dangling + * pointer. + */ if (fevent->result == ISC_R_CANCELED) { if (dns_rdataset_isassociated(fevent->rdataset)) { dns_rdataset_disassociate(fevent->rdataset);