]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
drop: adds test with a protocol change
authorPhilippe Antoine <pantoine@oisf.net>
Mon, 29 Jan 2024 14:24:47 +0000 (15:24 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 18 Mar 2024 09:03:38 +0000 (10:03 +0100)
Ticket: 6305

tests/drop-protocol-change/README.md [new file with mode: 0644]
tests/drop-protocol-change/input.pcap [new file with mode: 0644]
tests/drop-protocol-change/test.rules [new file with mode: 0644]
tests/drop-protocol-change/test.yaml [new file with mode: 0644]

diff --git a/tests/drop-protocol-change/README.md b/tests/drop-protocol-change/README.md
new file mode 100644 (file)
index 0000000..ab06a10
--- /dev/null
@@ -0,0 +1,11 @@
+# Test Description
+
+Test that we drop even on protocol change
+
+## PCAP
+
+Crafted from oss-fuzz reproducer
+
+## Related issues
+
+https://redmine.openinfosecfoundation.org/issues/6305
diff --git a/tests/drop-protocol-change/input.pcap b/tests/drop-protocol-change/input.pcap
new file mode 100644 (file)
index 0000000..7a8a814
Binary files /dev/null and b/tests/drop-protocol-change/input.pcap differ
diff --git a/tests/drop-protocol-change/test.rules b/tests/drop-protocol-change/test.rules
new file mode 100644 (file)
index 0000000..4401a95
--- /dev/null
@@ -0,0 +1 @@
+drop http any any -> any any (msg:"drop http"; sid:1; rev:1;)
diff --git a/tests/drop-protocol-change/test.yaml b/tests/drop-protocol-change/test.yaml
new file mode 100644 (file)
index 0000000..5d44c49
--- /dev/null
@@ -0,0 +1,19 @@
+requires:
+  min-version: 8
+
+args:
+  - -k none --set stream.midstream=true
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: flow
+        app_proto: http2
+        app_proto_orig: http
+        flow.action: drop
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 1