489848b1fa
Fixes: CVE-2014-8767 - denial of service in verbose mode using malformed OLSR payload OLSR payload CVE-2014-8768 - denial of service in verbose mode using malformed Geonet payload CVE-2014-8769 - unreliable output using malformed AOVD payload Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
20 lines
586 B
Diff
20 lines
586 B
Diff
From https://bugzilla.redhat.com/show_bug.cgi?id=1165162
|
|
|
|
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
|
|
|
--- tcpdump-tcpdump-4.6/print-udp.c 2014-11-21 13:53:05.757690197 +0700
|
|
+++ tcpdump-4.6.2/print-udp.c 2014-11-21 13:50:58.077695164 +0700
|
|
@@ -357,6 +357,12 @@
|
|
#ifdef INET6
|
|
register const struct ip6_hdr *ip6;
|
|
#endif
|
|
+ u_int caplength;
|
|
+
|
|
+ /* Checking length of available data before print */
|
|
+ caplength = (ndo->ndo_snapend >= bp) ? ndo->ndo_snapend - bp : 0;
|
|
+ if (length > caplength)
|
|
+ length = caplength;
|
|
|
|
if (ep > ndo->ndo_snapend)
|
|
ep = ndo->ndo_snapend;
|