From patchwork Thu Mar 16 18:41:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 739954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vkcl75tTRz9s0g for ; Fri, 17 Mar 2017 05:41:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 82DEC89237; Thu, 16 Mar 2017 18:41:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SCtNBEnJunSO; Thu, 16 Mar 2017 18:41:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id EDB2F89069; Thu, 16 Mar 2017 18:41:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9EDB71C0FDB for ; Thu, 16 Mar 2017 18:41:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 96CA28A001 for ; Thu, 16 Mar 2017 18:41:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dmiRTDialZjN for ; Thu, 16 Mar 2017 18:41:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTPS id 328948A005 for ; Thu, 16 Mar 2017 18:41:47 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 55BB5440535; Thu, 16 Mar 2017 20:41:25 +0200 (IST) From: Baruch Siach To: buildroot@busybox.net Date: Thu, 16 Mar 2017 20:41:23 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 Subject: [Buildroot] [PATCH] tcpreplay: patch security issue X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add upstream patch for CVE-2017-6429: Buffer overflow when reading crafted pcap file with large packets. https://github.com/appneta/tcpreplay/issues/278 Signed-off-by: Baruch Siach --- ...-capture-has-a-packet-that-is-too-large-2.patch | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 package/tcpreplay/0001-278-fail-if-capture-has-a-packet-that-is-too-large-2.patch diff --git a/package/tcpreplay/0001-278-fail-if-capture-has-a-packet-that-is-too-large-2.patch b/package/tcpreplay/0001-278-fail-if-capture-has-a-packet-that-is-too-large-2.patch new file mode 100644 index 000000000000..233b6d959f68 --- /dev/null +++ b/package/tcpreplay/0001-278-fail-if-capture-has-a-packet-that-is-too-large-2.patch @@ -0,0 +1,44 @@ +From d689d14dbcd768c028eab2fb378d849e543dcfe9 Mon Sep 17 00:00:00 2001 +From: Fred Klassen +Date: Sun, 26 Feb 2017 20:45:59 -0800 +Subject: [PATCH] #278 fail if capture has a packet that is too large (#286) + +* #278 fail if capture has a packet that is too large + +[baruch: remove the CHANGELOG update] +Signed-off-by: Baruch Siach +--- +Upstream status: upstream commit d689d14db + +diff --git a/src/tcpcapinfo.c b/src/tcpcapinfo.c +index 775f1625b00f..96928820fe94 100644 +--- a/src/tcpcapinfo.c ++++ b/src/tcpcapinfo.c +@@ -281,6 +281,15 @@ main(int argc, char *argv[]) + caplen = pcap_ph.caplen; + } + ++ if (caplentoobig) { ++ printf("\n\nCapture file appears to be damaged or corrupt.\n" ++ "Contains packet of size %u, bigger than snap length %u\n", ++ caplen, pcap_fh.snaplen); ++ ++ close(fd); ++ break; ++ } ++ + /* check to make sure timestamps don't go backwards */ + if (last_sec > 0 && last_usec > 0) { + if ((pcap_ph.ts.tv_sec == last_sec) ? +@@ -306,7 +315,7 @@ main(int argc, char *argv[]) + } + + close(fd); +- continue; ++ break; + } + + /* print the frame checksum */ +-- +2.11.0 +