]> git.ipfire.org Git - thirdparty/suricata.git/commit
dns: don't parse a full request during probe if not enough data
authorJason Ish <jason.ish@oisf.net>
Mon, 28 Feb 2022 22:48:34 +0000 (16:48 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 19 Apr 2022 21:56:01 +0000 (23:56 +0200)
commit27679a12aa4e03e960112f387640419d29780e5a
tree1bb192c6fc200275f4433d5c0a41a2eef8ed0fca
parent2a89185f0400a4642c7d96f066cf208a5bf6fd47
dns: don't parse a full request during probe if not enough data

If there is more data than a header, but not enough for a complete DNS
message, the hostname parser could return an error causing the probe to
fail on valid DNS messages.

So only parse the complete message if we have enough input data. This is
reliable for TCP as DNS messages are prefixed, but for UDP its just
going to be the size of the input buffer presented to the parser, so
incomplete could still happen.

Ticket #5034
rust/src/dns/dns.rs