mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 20:14:12 +08:00
9fd5c63aaa
Enable ND_LONGJMP_FROM_TCHECK. Report an invalid packet as invalid with a reason, not truncated. Test whether the invalid packet is entirely in the buffer. Remove two redundant ND_TCHECK*() instances and make another one conditional. Let nd_printzp() guard the packet buffer end. Add more length checks and make existing ones stricter. Decrement the remaining length instead of comparing pointers. Lose a duplicate "TLV" in the output. Reduce scope of two variables and lose another one. Update two tests.
56 lines
3.2 KiB
Plaintext
56 lines
3.2 KiB
Plaintext
1 11:46:11.550072 DTPv1, length 29
|
|
Domain (0x0001) TLV, length 8, Lab
|
|
Status (0x0002) TLV, length 5, 0x4
|
|
DTP type (0x0003) TLV, length 5, 0x40
|
|
Neighbor (0x0004) TLV, length 10, 00:19:06:ea:b8:85
|
|
2 11:46:11.550157 00:19:06:ea:b8:85 > 01:00:0c:00:00:00 SNAP, oui Cisco (0x00000c), pid Unknown (0x0003), length 68:
|
|
0x0000: aaaa 0300 000c 0003 0000 0000 0100 0ccc ................
|
|
0x0010: cccc 0019 06ea b885 0025 aaaa 0300 000c .........%......
|
|
0x0020: 2004 0100 0100 084c 6162 0000 0200 0504 .......Lab......
|
|
0x0030: 0003 0005 4000 0400 0a00 1906 eab8 8500 ....@...........
|
|
0x0040: 0000 0000 0000 0000 f7a7 fe42 ...........B
|
|
3 11:46:41.559806 DTPv1, length 29
|
|
Domain (0x0001) TLV, length 8, Lab
|
|
Status (0x0002) TLV, length 5, 0x4
|
|
DTP type (0x0003) TLV, length 5, 0x40
|
|
Neighbor (0x0004) TLV, length 10, 00:19:06:ea:b8:85
|
|
4 11:46:41.559890 00:19:06:ea:b8:85 > 01:00:0c:00:00:00 SNAP, oui Cisco (0x00000c), pid Unknown (0x0003), length 68:
|
|
0x0000: aaaa 0300 000c 0003 0000 0000 0100 0ccc ................
|
|
0x0010: cccc 0019 06ea b885 0025 aaaa 0300 000c .........%......
|
|
0x0020: 2004 0100 0100 084c 6162 0000 0200 0504 .......Lab......
|
|
0x0030: 0003 0005 4000 0400 0a00 1906 eab8 8500 ....@...........
|
|
0x0040: 0000 0000 0000 0000 f7a7 fe42 ...........B
|
|
5 11:47:11.566606 DTPv1, length 29
|
|
Domain (0x0001) TLV, length 8, Lab
|
|
Status (0x0002) TLV, length 5, 0x4
|
|
DTP type (0x0003) TLV, length 5, 0x40
|
|
Neighbor (0x0004) TLV, length 10, 00:19:06:ea:b8:85
|
|
6 11:47:11.566691 00:19:06:ea:b8:85 > 01:00:0c:00:00:00 SNAP, oui Cisco (0x00000c), pid Unknown (0x0003), length 68:
|
|
0x0000: aaaa 0300 000c 0003 0000 0000 0100 0ccc ................
|
|
0x0010: cccc 0019 06ea b885 0025 aaaa 0300 000c .........%......
|
|
0x0020: 2004 0100 0100 084c 6162 0000 0200 0504 .......Lab......
|
|
0x0030: 0003 0005 4000 0400 0a00 1906 eab8 8500 ....@...........
|
|
0x0040: 0000 0000 0000 0000 f7a7 fe42 ...........B
|
|
7 11:47:41.576275 DTPv1, length 29
|
|
Domain (0x0001) TLV, length 8, Lab
|
|
Status (0x0002) TLV, length 5, 0x4
|
|
DTP type (0x0003) TLV, length 5, 0x40
|
|
Neighbor (0x0004) TLV, length 10, 00:19:06:ea:b8:85
|
|
8 11:47:41.576360 00:19:06:ea:b8:85 > 01:00:0c:00:00:00 SNAP, oui Cisco (0x00000c), pid Unknown (0x0003), length 68:
|
|
0x0000: aaaa 0300 000c 0003 0000 0000 0100 0ccc ................
|
|
0x0010: cccc 0019 06ea b885 0025 aaaa 0300 000c .........%......
|
|
0x0020: 2004 0100 0100 084c 6162 0000 0200 0504 .......Lab......
|
|
0x0030: 0003 0005 4000 0400 0a00 1906 eab8 8514 ....@...........
|
|
0x0040: 0002 000f 0000 0000 7232 1da6 ........r2..
|
|
9 11:48:11.585963 DTPv1, length 29
|
|
Domain (0x0001) TLV, length 8, Lab
|
|
Status (0x0002) TLV, length 5, 0x4
|
|
DTP type (0x0003) TLV, length 5, 0x40
|
|
Neighbor (0x0004) TLV, length 10, 00:19:06:ea:b8:85
|
|
10 11:48:11.586048 00:19:06:ea:b8:85 > 01:00:0c:00:00:00 SNAP, oui Cisco (0x00000c), pid Unknown (0x0003), length 68:
|
|
0x0000: aaaa 0300 000c 0003 0000 0000 0100 0ccc ................
|
|
0x0010: cccc 0019 06ea b885 0025 aaaa 0300 000c .........%......
|
|
0x0020: 2004 0100 0100 084c 6162 0000 0200 0504 .......Lab......
|
|
0x0030: 0003 0005 4000 0400 0a00 1906 eab8 8514 ....@...........
|
|
0x0040: 0002 000f 0000 0000 7232 1da6 ........r2..
|