]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect/http: fix progress for headers keywords
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 15 Oct 2024 19:05:19 +0000 (21:05 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 5 Nov 2024 10:39:55 +0000 (11:39 +0100)
commitcca59cdaa9dd896a92a2dd4f30a6ebd5ba2cd000
tree5546267fd9627c901c6f5c6d2784ea22f196c67f
parent56e10fd3b298200cbf210bfe957da2eaa6af93ac
detect/http: fix progress for headers keywords

Ticket: 7326

Having a lower progress than one where we actually can get
occurences of the multibuffer made prefilter
bail out too early, not having found a buffer in the multi-buffer
that matiched the prefilter.

For example, we registered http_request_header with progress 0
instad of progress HTP_REQUEST_HEADERS==2, and if the first
packet had only the request line, we would consider
that signatures with http_request_header as prefilter/fast_pattern
could not match for this transaction, even if they in fact
could have a later packet with matching headers.

Hence, we got false negatives, if http.request_header or
http.response_header was used as fast pattern, and if the request
or response came in multiple packets, and the first of these packets
did not have enough data (like only http request line),
and the next packets did have the matching data.
src/detect-http-header.c