]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Adds test about tcp protocol detection bailout
authorPhilippe Antoine <contact@catenacyber.fr>
Fri, 23 Apr 2021 20:24:20 +0000 (22:24 +0200)
committerJason Ish <jason.ish@oisf.net>
Tue, 28 Sep 2021 16:21:35 +0000 (10:21 -0600)
tests/tcp-protodetect-bailout/README.md [new file with mode: 0644]
tests/tcp-protodetect-bailout/input.pcap [new file with mode: 0644]
tests/tcp-protodetect-bailout/test.yaml [new file with mode: 0644]

diff --git a/tests/tcp-protodetect-bailout/README.md b/tests/tcp-protodetect-bailout/README.md
new file mode 100644 (file)
index 0000000..bbc49fd
--- /dev/null
@@ -0,0 +1,13 @@
+# Description
+
+Test absence of impossible case in `TCPProtoDetectCheckBailConditions`
+
+# PCAP
+
+The pcap comes from https://redmine.openinfosecfoundation.org/issues/4171
+
+This pcap was produced with
+1. python script from http-connect S-V test
+2. Mixed packets order with editcap and mergecap (1-6,10,9,7-8)
+3. Manually crafted to increase the TCP option window scale to 7 (128) on both sides
+4. Manually crafted to increase the sequence number of now packet 7 (second packet with tcp payload) adding 0x100000 (as much needed to trigger `DEBUG_VALIDATE_BUG_ON(size_ts > 1000000UL);`)
diff --git a/tests/tcp-protodetect-bailout/input.pcap b/tests/tcp-protodetect-bailout/input.pcap
new file mode 100644 (file)
index 0000000..9bb197b
Binary files /dev/null and b/tests/tcp-protodetect-bailout/input.pcap differ
diff --git a/tests/tcp-protodetect-bailout/test.yaml b/tests/tcp-protodetect-bailout/test.yaml
new file mode 100644 (file)
index 0000000..9d15ab8
--- /dev/null
@@ -0,0 +1,10 @@
+# disables checksum verification
+args:
+- -k none
+- --set stream.reassembly.depth=0
+
+checks:
+  - filter:
+      count: 1
+      match:
+        event_type: flow