]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check that the message is non NULL in dns_dt_parse 12463/head
authorMark Andrews <marka@isc.org>
Tue, 28 Jul 2026 06:42:08 +0000 (16:42 +1000)
committerMark Andrews <marka@isc.org>
Mon, 3 Aug 2026 23:05:36 +0000 (09:05 +1000)
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

index 29a5882512c2ca7dcd4da4237d5d3c940c95cb26..5d2468ffa5a20e522884445d0f20a668dc1f6ebd 100644 (file)
@@ -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: