]> git.ipfire.org Git - thirdparty/suricata.git/commit
Fix False Positive of rules with ports on portless protocols 872/head
authorVictor Julien <victor@inliniac.net>
Tue, 4 Mar 2014 16:49:36 +0000 (17:49 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 4 Mar 2014 16:49:36 +0000 (17:49 +0100)
commitf00703acc1b75a4e402c96995724f91fa6bda141
tree47264c5454e3e1ab6898f111b2c5c0371db2b1a5
parent00d2f2d627bfe3eb1245dda28033a459fb55de27
Fix False Positive of rules with ports on portless protocols

In case of 'alert ip' rules that have ports, the port checks would
be bypassed for non-port protocols, such as ICMP. This would lead to
a rule matching: a false positive.

This patch adds a check. If the rule has a port setting other than
'any' and the protocol is not TCP, UDP or SCTP, then we rule won't
match.

Rules with 'alert ip' and ports are rare, so the impact should be
minimal.

Bug #611.
src/detect.c