]> The Tcpdump Group git mirrors - tcpdump/commitdiff
SMB: Add two test capture files
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 29 Oct 2019 09:47:07 +0000 (10:47 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 29 Oct 2019 11:42:12 +0000 (12:42 +0100)
These are tests for print-smb.c:print_trans().

These capture files triggered a buffer over-read fixed by
50f375f9f1444e744d6e4b117940f0a7c9dd8c23.

The pcap files were updated to avoid pcap_loop() error messages.

Update the output of the tests accordingly.

Update from 4bfd71eee41a1db0647fa4d434841a51b07ec38a
in 4.9 branch.

tests/TESTLIST
tests/smb_print_trans-oobr1.out [new file with mode: 0644]
tests/smb_print_trans-oobr1.pcap [new file with mode: 0644]
tests/smb_print_trans-oobr2.out [new file with mode: 0644]
tests/smb_print_trans-oobr2.pcap [new file with mode: 0644]

index 9027af9cce69c6794f5df86a3ea18e7fff05c43b..c895f5be0d9cfa6c0b7a930f9d4683da2a24d504 100644 (file)
@@ -655,11 +655,15 @@ babel_update_oobr babel_update_oobr.pcap          babel_update_oobr.out
 ospf6_print_lshdr-oobr ospf6_print_lshdr-oobr.pcap ospf6_print_lshdr-oobr.out -vv
 rpl-dao-oobr rpl-dao-oobr.pcap rpl-dao-oobr.out -vv
 hncp_prefix-oobr hncp_prefix-oobr.pcap hncp_prefix-oobr.out -vvv
+smb_print_trans-oobr1 smb_print_trans-oobr1.pcap smb_print_trans-oobr1.out -vv
 
 # bad packets from Ryan Ackroyd
 ieee802.11_meshhdr-oobr ieee802.11_meshhdr-oobr.pcap ieee802.11_meshhdr-oobr.out -H
 dccp_options-oobr dccp_options-oobr.pcap dccp_options-oobr.out -vv
 
+# bad packets from Philippe Antoine
+smb_print_trans-oobr2 smb_print_trans-oobr2.pcap smb_print_trans-oobr2.out -vv
+
 # RTP tests
 # fuzzed pcap
 rtp-seg-fault-1  rtp-seg-fault-1.pcapng  rtp-seg-fault-1.out  -v -T rtp
diff --git a/tests/smb_print_trans-oobr1.out b/tests/smb_print_trans-oobr1.out
new file mode 100644 (file)
index 0000000..e7ea877
--- /dev/null
@@ -0,0 +1,37 @@
+    1  10:06:29.360507 IPX a8f87967.00:00:00:00:00:01.0455 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
+    2  10:06:30.201745 IPX a8f87967.00:00:00:00:00:01.0455 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
+    3  10:06:31.042990 IPX a8f87967.00:00:00:ff:ff:ff.7f55 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
+    4  10:06:31.884337 IPX a855000b.41:44:4d:49:4e:54.4553 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 162
+>>> IPX transport Data: (24 bytes)
+[000] 54 20 20 20 20 20 20 00  01 02 5F 5F 4D 53 26 52  T      ^@ ^A^B__MS&R
+[010] 4F 57 53 45 5F 5F 02 01                           OWSE__^B^A 
+
+SMB PACKET: SMBtrans (REQUEST)
+SMB Command   =  0x25
+Error class   =  0x0
+Error code    =  0 (0x0)
+Flags1        =  0x0
+Flags2        =  0x0
+Tree ID       =  0 (0x0)
+Proc ID       =  0 (0x0)
+UID           =  0 (0x0)
+MID           =  0 (0x0)
+Word Count    =  17 (0x11)
+TotParamCnt=0 (0x0)
+TotDataCnt=42 (0x2a)
+MaxParmCnt=0 (0x0)
+MaxDataCnt=0 (0x0)
+MaxSCnt=0 (0x0)
+TransFlags=0x0
+Res1=0x3E8
+Res2=0x0
+Res3=0x0
+ParamCnt=0 (0x0)
+ParamOff=0 (0x0)
+DataCnt=42 (0x2a)
+DataOff=86 (0x56)
+SUCnt=3 (0x3)
+Data: (6 bytes)
+[000] 01 00 01 00 02 00                                 ^A^@^A^@^B^@ 
+smb_bcc=59
+ [|smb]
diff --git a/tests/smb_print_trans-oobr1.pcap b/tests/smb_print_trans-oobr1.pcap
new file mode 100644 (file)
index 0000000..8a362ce
Binary files /dev/null and b/tests/smb_print_trans-oobr1.pcap differ
diff --git a/tests/smb_print_trans-oobr2.out b/tests/smb_print_trans-oobr2.out
new file mode 100644 (file)
index 0000000..f526a2c
--- /dev/null
@@ -0,0 +1,35 @@
+    1  15:17:28.958610 IP (tos 0x0, ttl 128, id 14471, offset 0, flags [none], proto UDP (17), length 207)
+    192.168.1.249.138 > 192.168.1.255.138: 
+>>> NBT UDP PACKET(138) Res=0x110E ID=0x891D IP=192 (0xc0).168 (0xa8).1 (0x1).249 (0xf9) Port=138 (0x8a) Length=165 (0xa5) Res2=0x0
+SourceName=DJP95S0J        NameType=0x00 (Workstation)
+DestName=ARBEIT          NameType=0x00 (Workstation)
+
+SMB PACKET: SMBtrans (REQUEST)
+SMB Command   =  0x25
+Error class   =  0x0
+Error code    =  0 (0x0)
+Flags1        =  0x0
+Flags2        =  0x0
+Tree ID       =  0 (0x0)
+Proc ID       =  0 (0x0)
+UID           =  0 (0x0)
+MID           =  0 (0x0)
+Word Count    =  17 (0x11)
+TotParamCnt=0 (0x0)
+TotDataCnt=11 (0xb)
+MaxParmCnt=0 (0x0)
+MaxDataCnt=0 (0x0)
+MaxSCnt=0 (0x0)
+TransFlags=0x0
+Res1=0x3E8
+Res2=0x0
+Res3=0x0
+ParamCnt=0 (0x0)
+ParamOff=0 (0x0)
+DataCnt=11 (0xb)
+DataOff=86 (0x56)
+SUCnt=3 (0x3)
+Data: (6 bytes)
+[000] 01 00 01 00 02 00                                 ^A^@^A^@^B^@ 
+smb_bcc=28
+ [|smb]
diff --git a/tests/smb_print_trans-oobr2.pcap b/tests/smb_print_trans-oobr2.pcap
new file mode 100644 (file)
index 0000000..27e5706
Binary files /dev/null and b/tests/smb_print_trans-oobr2.pcap differ