From: Mark Andrews Date: Tue, 28 Jul 2026 06:42:08 +0000 (+1000) Subject: Check that the message is non NULL in dns_dt_parse X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3eba266db772003ba2dada8baa8ce29a7d02eaa;p=thirdparty%2Fbind9.git Check that the message is non NULL in dns_dt_parse It was possible to dereference a NULL pointer in dns_dt_parse if it was reading a malformed DNSTAP file. This would could cause dnstap-read to exit. This has been fixed. --- diff --git a/lib/dns/dnstap.c b/lib/dns/dnstap.c index 29a5882512c..5d2468ffa5a 100644 --- a/lib/dns/dnstap.c +++ b/lib/dns/dnstap.c @@ -1036,6 +1036,10 @@ dns_dt_parse(isc_mem_t *mctx, isc_region_t *src, dns_dtdata_t **destp) { m = frame->message; + if (m == NULL) { + CLEANUP(DNS_R_BADDNSTAP); + } + /* Message type */ switch (m->type) { case DNSTAP__MESSAGE__TYPE__AUTH_QUERY: