]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect/pcre: fix memory read error in detect
authorVictor Julien <victor@inliniac.net>
Wed, 20 Feb 2019 15:58:34 +0000 (16:58 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 6 Mar 2019 13:03:20 +0000 (14:03 +0100)
commit17295591ee7fbdc00d4e25805e7c07a2df8977de
tree4f717407fb5ef47e370aae9bd42de3bb845bf777
parent61eb9c21ed215c6ba3f1d522800cedeac095d115
detect/pcre: fix memory read error in detect

Fix case where a HTTP modifier in PCRE statements in a rule that would not
set the http protocol, would lead to a HTTP condition being run against
a non-HTTP flow. This would lead to invalid memory access.

Fix by properly setting the alproto and SIG_FLAG_APPLAYER flag in the
signature, leading to the signature implicitly setting the protocol
so rejecting it for inspection when the flow has a different protocol.

Bug #2863
src/detect-pcre.c