diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-07-03 15:54:14 -0700 |
---|---|---|
committer | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2017-01-18 09:16:36 +0100 |
commit | 6bc44295cfbe1f7b6633c755841518f4b159aa8a (patch) | |
tree | 859fda193d4664cfce2892e3c3c219847ada789b /print-fr.c | |
parent | 237efcf593ee369519e9dfdc9166702219dabfec (diff) | |
download | tcpdump-6bc44295cfbe1f7b6633c755841518f4b159aa8a.tar.gz |
CVE-2016-7985,7986/Change the way protocols print link-layer addresses.
If a protocol that runs under a link-layer protocol would print the
link-layer addresses for the packet as source and destination addresses
for the packet, don't have it blithely assume those link-layer addresses
are present or are at a particular offset from the beginning of that
protocol's data; Ethertypes, for example, are used by a number of
protocols, not all of which have Ethernet headers and not all of which
have any MAC headers.
Instead, pass the printers for those protocols structures with a pointer
to the address data and a pointer to a routine that prints the address.
Fixes some heap overflows found with American Fuzzy Lop by Hanno Böck.
Diffstat (limited to 'print-fr.c')
-rw-r--r-- | print-fr.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -276,7 +276,8 @@ fr_print(netdissect_options *ndo, if (ethertype_print(ndo, extracted_ethertype, p+addr_len+ETHERTYPE_LEN, length-addr_len-ETHERTYPE_LEN, - length-addr_len-ETHERTYPE_LEN) == 0) + length-addr_len-ETHERTYPE_LEN, + NULL, NULL) == 0) /* ether_type not known, probably it wasn't one */ ND_PRINT((ndo, "UI %02x! ", p[addr_len])); else |