diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-01-25 20:36:16 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-02-07 18:48:49 +0100 |
commit | f253e110096ed673dc9de26da43ca80eaa2baec1 (patch) | |
tree | 653cd4d65e298345866b9020cc1a737384fc97a3 /tests/hoobr_lookup_nsap.out | |
parent | fb154b00bad613756c18c56dd01bbb37e78f1b22 (diff) | |
download | tcpdump-f253e110096ed673dc9de26da43ca80eaa2baec1.tar.gz |
Add a sanity check on packet header length
The packet length must be <= MAXIMUM_SNAPLEN.
Currently, there is no D-Bus printer, thus no need for a bigger length.
Now a pachet is valid if:
capture length != 0,
packet length != 0,
capture length <= MAXIMUM_SNAPLEN,
packet length <= MAXIMUM_SNAPLEN,
packet length >= capture length.
Moreover:
Fix the packet header lengths of some fuzzed pcap files:
If the lengths are > MAXIMUM_SNAPLEN, set them to MAXIMUM_SNAPLEN.
Thus they will be always usable with this new sanity check.
Diffstat (limited to 'tests/hoobr_lookup_nsap.out')
-rw-r--r-- | tests/hoobr_lookup_nsap.out | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/hoobr_lookup_nsap.out b/tests/hoobr_lookup_nsap.out index 7d8613b0..3105fe55 100644 --- a/tests/hoobr_lookup_nsap.out +++ b/tests/hoobr_lookup_nsap.out @@ -1,23 +1,23 @@ -30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432: +30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 262144: 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000 0x0010: 3030 3030 3030 000000 -30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432: +30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 262144: 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000 0x0010: 3030 3030 3030 000000 -30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432: +30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 262144: 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000 0x0010: 3030 3030 3030 000000 -30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432: +30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 262144: 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000 0x0010: 3030 3030 3030 000000 -30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432: +30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 262144: 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000 0x0010: 3030 3030 3030 000000 -30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432: +30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 262144: 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000 0x0010: 3030 3030 3030 000000 -CLNP, 30.0000.0000.0000 > 30.3030, unknown (16), length 808464417 -30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432: +CLNP, 30.0000.0000.0000 > 30.3030, unknown (16), length 262129 +30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 262144: 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000 0x0010: 3030 3030 3030 000000 -CLNP, 30.0000.0000.0000 > 30.3030, unknown (16), length 808464417 +CLNP, 30.0000.0000.0000 > 30.3030, unknown (16), length 262129 |