]> git.ipfire.org Git - people/ms/suricata.git/commit
detect: fix multi inspect buffer issue; clean up
authorVictor Julien <victor@inliniac.net>
Thu, 13 May 2021 05:50:12 +0000 (07:50 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 15 Jun 2021 09:25:24 +0000 (11:25 +0200)
commit3dc50322db0efb92683b9578c7dccd1fae4b5cb2
tree141f7baee03c45064c66c299a466aa625d97b1d9
parent23d7beb458bfcdddfd49545d551a7914e6a020d4
detect: fix multi inspect buffer issue; clean up

Fix multi inspect buffer API causing cleanup logic in the single
inspect buffer paths. This could lead to a buffer overrun in the
"to clear" logic.

Multi buffers now use InspectionBufferSetupMulti instead of
InspectionBuffer. This is enforced by a check in debug validation.

Simplify the multi inspect buffer setup code and update the callers.
14 files changed:
src/detect-dns-query.c
src/detect-engine.c
src/detect-engine.h
src/detect-file-data.c
src/detect-filemagic.c
src/detect-filename.c
src/detect-http2.c
src/detect-ike-vendor.c
src/detect-krb5-cname.c
src/detect-krb5-sname.c
src/detect-mqtt-subscribe-topic.c
src/detect-mqtt-unsubscribe-topic.c
src/detect-tls-certs.c
src/detect.h