]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
dns/probe: check that a request has at least one query
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 3 Oct 2024 13:16:44 +0000 (15:16 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 20 Dec 2024 06:55:46 +0000 (07:55 +0100)
Ticket: 7279

rust/src/dns/dns.rs

index 11ebfb1a4c1c483acc740abc6eadf5e3cf3e9e10..1dad2a94d99e32b6961d5a8add2fc0161048270d 100644 (file)
@@ -789,6 +789,9 @@ fn probe_header_validity(header: &DNSHeader, rlen: usize) -> (bool, bool, bool)
     }
 
     let is_request = header.flags & 0x8000 == 0;
+    if is_request && header.questions == 0 {
+        return (false, false, false);
+    }
     return (true, is_request, false);
 }