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-geneve.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-geneve.c')
-rw-r--r-- | print-geneve.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/print-geneve.c b/print-geneve.c index d565103d..f0319636 100644 --- a/print-geneve.c +++ b/print-geneve.c @@ -223,7 +223,7 @@ geneve_print(netdissect_options *ndo, const u_char *bp, u_int len) else ND_PRINT((ndo, "\n\t")); - if (ethertype_print(ndo, prot, bp, len, len) == 0) { + if (ethertype_print(ndo, prot, bp, len, len, NULL, NULL) == 0) { if (prot == ETHERTYPE_TEB) ether_print(ndo, bp, len, len, NULL, NULL); else |