From: Victor Julien Date: Wed, 21 Jan 2026 12:34:12 +0000 (+0100) Subject: tests: add test for issue 4220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd535405ecc8a55ae0ec0bcce9b937e7348c3e77;p=thirdparty%2Fsuricata-verify.git tests: add test for issue 4220 Not showing a problem, behavior is as expected. --- diff --git a/tests/issue-4220-01-ids/1flowB.pcap b/tests/issue-4220-01-ids/1flowB.pcap new file mode 100644 index 000000000..4dc55846b Binary files /dev/null and b/tests/issue-4220-01-ids/1flowB.pcap differ diff --git a/tests/issue-4220-01-ids/README.md b/tests/issue-4220-01-ids/README.md new file mode 100644 index 000000000..a34df1499 --- /dev/null +++ b/tests/issue-4220-01-ids/README.md @@ -0,0 +1,3 @@ +Show that a broken TCP session is still correctly processed in the more liberal IDS mode. + +https://redmine.openinfosecfoundation.org/issues/4220 diff --git a/tests/issue-4220-01-ids/suricata.rules b/tests/issue-4220-01-ids/suricata.rules new file mode 100644 index 000000000..7e5011189 --- /dev/null +++ b/tests/issue-4220-01-ids/suricata.rules @@ -0,0 +1 @@ +alert smtp any any -> $SMTP_SERVERS any (msg:"inline-test"; flow:established; content:"|0D 0A 0D 0A|TV"; content:"AAAAAAAAAAAAAAAA"; within:200; classtype:bad-unknown; sid:1000009; rev:1;) diff --git a/tests/issue-4220-01-ids/test.yaml b/tests/issue-4220-01-ids/test.yaml new file mode 100644 index 000000000..802fac355 --- /dev/null +++ b/tests/issue-4220-01-ids/test.yaml @@ -0,0 +1,11 @@ +checks: + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 1000009 + - filter: + count: 1 + match: + event_type: flow + app_proto: smtp diff --git a/tests/issue-4220-02-ips/README.md b/tests/issue-4220-02-ips/README.md new file mode 100644 index 000000000..87ef8a64c --- /dev/null +++ b/tests/issue-4220-02-ips/README.md @@ -0,0 +1,3 @@ +Show that a broken TCP session is correctly dropped. + +https://redmine.openinfosecfoundation.org/issues/4220 diff --git a/tests/issue-4220-02-ips/suricata.rules b/tests/issue-4220-02-ips/suricata.rules new file mode 100644 index 000000000..7e5011189 --- /dev/null +++ b/tests/issue-4220-02-ips/suricata.rules @@ -0,0 +1 @@ +alert smtp any any -> $SMTP_SERVERS any (msg:"inline-test"; flow:established; content:"|0D 0A 0D 0A|TV"; content:"AAAAAAAAAAAAAAAA"; within:200; classtype:bad-unknown; sid:1000009; rev:1;) diff --git a/tests/issue-4220-02-ips/test.yaml b/tests/issue-4220-02-ips/test.yaml new file mode 100644 index 000000000..124d0be4f --- /dev/null +++ b/tests/issue-4220-02-ips/test.yaml @@ -0,0 +1,16 @@ +pcap: ../issue-4220-01-ids/1flowB.pcap + +checks: + - filter: + count: 0 + match: + event_type: alert + alert.signature_id: 1000009 + - filter: + count: 1 + match: + stats.ips.accepted: 3 + stats.ips.blocked: 1355 + stats.ips.drop_reason.stream_error: 1355 + stats.flow.end.tcp_state.syn_recv: 1 + stats.flow.end.state.new: 1