From a20d6e94815a475dc629df458ef0dfb409f6dd75 Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Fri, 31 Aug 2012 15:04:36 +0400 Subject: [PATCH] net/wireshark: fix CVE-2012-3548 Take the patch from the upstream Bugzilla. Signed-off-by: Eygene Ryabinkin --- net/wireshark/Makefile | 1 + net/wireshark/files/patch-cve-2012-3548 | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 net/wireshark/files/patch-cve-2012-3548 diff --git a/net/wireshark/Makefile b/net/wireshark/Makefile index 748417f..57ba433 100644 --- a/net/wireshark/Makefile +++ b/net/wireshark/Makefile @@ -7,6 +7,7 @@ PORTNAME?= wireshark PORTVERSION= 1.8.2 +PORTREVISION= 1 CATEGORIES= net ipv6 MASTER_SITES= http://www.wireshark.org/download/src/ \ http://ftp.uni-kl.de/pub/wireshark/src/ \ diff --git a/net/wireshark/files/patch-cve-2012-3548 b/net/wireshark/files/patch-cve-2012-3548 new file mode 100644 index 0000000..b874dd73 --- /dev/null +++ b/net/wireshark/files/patch-cve-2012-3548 @@ -0,0 +1,23 @@ +Obtained-from: https://bugs.wireshark.org/bugzilla/attachment.cgi?id=9009&action=diff&context=patch&collapsed=&headers=1&format=raw + +--- epan/dissectors/packet-drda.c (revision 44689) ++++ epan/dissectors/packet-drda.c (working copy) +@@ -55,6 +55,7 @@ + #include + #include + #include ++#include + #include "packet-tcp.h" + + static int proto_drda = -1; +@@ -696,6 +697,10 @@ + { + iCommand = tvb_get_ntohs(tvb, offset + 8); + iLength = tvb_get_ntohs(tvb, offset + 0); ++ if (iLength < 10) { ++ expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_ERROR, "Invalid length detected (%u): should be at least 10 bytes long", iLength); ++ break; ++ } + /* iCommandEnd is the length of the packet up to the end of the current command */ + iCommandEnd += iLength; + -- 1.7.11.3