From a3eba266db772003ba2dada8baa8ce29a7d02eaa Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 28 Jul 2026 16:42:08 +1000 Subject: [PATCH] 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. --- lib/dns/dnstap.c | 4 ++++ 1 file changed, 4 insertions(+) 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: -- 2.47.3