From: Jeff Lucovsky Date: Sat, 5 Dec 2020 14:43:12 +0000 (-0500) Subject: threshold-config: New test for issue in 2190 X-Git-Tag: suricata-6.0.4~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d857694e2d9114088d340c63a19e4b192b470d3a;p=thirdparty%2Fsuricata-verify.git threshold-config: New test for issue in 2190 This commit adds a test case for large IP address handling in the threshold.config file. --- diff --git a/tests/bug-2190/input.pcap b/tests/bug-2190/input.pcap new file mode 100644 index 000000000..170b5e89d Binary files /dev/null and b/tests/bug-2190/input.pcap differ diff --git a/tests/bug-2190/test.rules b/tests/bug-2190/test.rules new file mode 100644 index 000000000..4c0d517cb --- /dev/null +++ b/tests/bug-2190/test.rules @@ -0,0 +1 @@ +alert http any any -> any any (http.request_body; url_decode; content:"mail=test@oisf.net"; sid:1;) diff --git a/tests/bug-2190/test.yaml b/tests/bug-2190/test.yaml new file mode 100644 index 000000000..810139289 --- /dev/null +++ b/tests/bug-2190/test.yaml @@ -0,0 +1,15 @@ +requires: + min-version: 6 + +exit-code: 0 + +command: | + ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/etc/classification.config" \ + --set reference-config-file="${SRCDIR}/etc/reference.config" -l ${OUTPUT_DIR} \ + --set threshold-file="${TEST_DIR}/threshold.config" \ + -c "${SRCDIR}/suricata.yaml" -r ${TEST_DIR}/input.pcap -S ${TEST_DIR}/test.rules + +checks: + - shell: + args: grep "SC_ERR_PCRE_" suricata.log | wc -l | xargs + expect: 0 diff --git a/tests/bug-2190/threshold.config b/tests/bug-2190/threshold.config new file mode 100644 index 000000000..fb8e9d70d --- /dev/null +++ b/tests/bug-2190/threshold.config @@ -0,0 +1 @@ +suppress gen_id 0, sig_id 0, track by_src, ip [123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32,123.123.123.123/32]