]> git.ipfire.org Git - thirdparty/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>
Fri, 25 Jun 2021 15:11:00 +0000 (17:11 +0200)
commitc9270f68541304e6d8128e5af0c0d385e8089737
tree2b0b32a77d69ce635f4049af7a38e671c3b25a09
parentd70bbb24f44b9b32fb189b4a3c1e0edb26421b9a
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.

(cherry picked from commit 3dc50322db0efb92683b9578c7dccd1fae4b5cb2)
13 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-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