]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect: fix crash when stream inspect runs on UDP 2811/head
authorVictor Julien <victor@inliniac.net>
Tue, 27 Jun 2017 07:59:48 +0000 (09:59 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 27 Jun 2017 07:59:48 +0000 (09:59 +0200)
commit885b8cefec83b63bbde1279f59d7ff1e40ba320c
treef1bb0517b96bf4a857ca7b358aed9a4807c0af4c
parent6226338d5b830c20397bc41d02ed8937c1ff43e6
detect: fix crash when stream inspect runs on UDP

Certain rules can apply to both TCP and UDP. For example 'alert dns'
rules are inspected against both TCP and UDP. This lead to the
stream inspect engine being called on a UDP packet.

This patch fixes the issue by exiting early from the stream inspect
engine if a) proto is not TCP or b) ssn is not available

Bug #2158.
src/detect-engine-payload.c