From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 340201382C5 for ; Sat, 24 Feb 2018 05:07:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5000DE07F6; Sat, 24 Feb 2018 05:07:01 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1FD4CE07F6 for ; Sat, 24 Feb 2018 05:06:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 14DCF335C2F for ; Sat, 24 Feb 2018 05:06:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 950A6235 for ; Sat, 24 Feb 2018 05:06:55 +0000 (UTC) From: "Richard Farina" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Farina" Message-ID: <1519448762.30594418a8d35519a5a055157ea8be27d8c49e9f.zerochaos@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/ettercap/, net-analyzer/ettercap/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/ettercap/ettercap-0.8.2-r1.ebuild net-analyzer/ettercap/files/cve-2017-6430.patch X-VCS-Directories: net-analyzer/ettercap/ net-analyzer/ettercap/files/ X-VCS-Committer: zerochaos X-VCS-Committer-Name: Richard Farina X-VCS-Revision: 30594418a8d35519a5a055157ea8be27d8c49e9f X-VCS-Branch: master Date: Sat, 24 Feb 2018 05:06:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3f8acdb4-5bdf-47a1-8129-e85075a09924 X-Archives-Hash: bcc37dbcfc128409fc68678e4a70b7c8 commit: 30594418a8d35519a5a055157ea8be27d8c49e9f Author: Zero_Chaos gentoo org> AuthorDate: Sat Feb 24 05:06:02 2018 +0000 Commit: Richard Farina gentoo org> CommitDate: Sat Feb 24 05:06:02 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30594418 net-analyzer/ettercap: bug #612226 Package-Manager: Portage-2.3.24, Repoman-2.3.6 net-analyzer/ettercap/ettercap-0.8.2-r1.ebuild | 62 ++++++++++++++++++++++ net-analyzer/ettercap/files/cve-2017-6430.patch | 68 +++++++++++++++++++++++++ 2 files changed, 130 insertions(+) diff --git a/net-analyzer/ettercap/ettercap-0.8.2-r1.ebuild b/net-analyzer/ettercap/ettercap-0.8.2-r1.ebuild new file mode 100644 index 00000000000..71fe6afb63c --- /dev/null +++ b/net-analyzer/ettercap/ettercap-0.8.2-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit cmake-utils + +DESCRIPTION="A suite for man in the middle attacks" +HOMEPAGE="https://github.com/Ettercap/ettercap" +SRC_URI="https://github.com/Ettercap/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" #mirror does not work + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="gtk ipv6 ncurses +plugins" + +RDEPEND="dev-libs/libbsd + dev-libs/libpcre + dev-libs/openssl:0= + net-libs/libnet:1.1 + >=net-libs/libpcap-0.8.1 + sys-libs/zlib + gtk? ( + >=dev-libs/atk-1.2.4 + >=dev-libs/glib-2.2.2:2 + media-libs/freetype + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + >=x11-libs/gtk+-2.2.2:2 + >=x11-libs/pango-1.2.3 + ) + ncurses? ( >=sys-libs/ncurses-5.3:= ) + plugins? ( >=net-misc/curl-7.26.0 )" +DEPEND="${RDEPEND} + sys-devel/flex + virtual/yacc" + +src_prepare() { + sed -i "s:Release:Release Gentoo:" CMakeLists.txt || die + epatch "${FILESDIR}"/cve-2017-6430.patch + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_enable ncurses CURSES) + $(cmake-utils_use_enable gtk) + $(cmake-utils_use_enable plugins) + $(cmake-utils_use_enable ipv6) + -DBUNDLED_LIBS=OFF + -DSYSTEM_LIBS=ON + -DINSTALL_SYSCONFDIR="${EROOT}"etc + ) + #right now we only support gtk2, but ettercap also supports gtk3 + #do we care? do we want to support both? + + #we want to enable testing but it fails right now + #we want to disable the bundled crap, but we are missing at least "libcheck" + #if we want to enable tests, we need to fix it, and either package libcheck or allow bundled version + #$(cmake-utils_use_enable test TESTS) + cmake-utils_src_configure +} diff --git a/net-analyzer/ettercap/files/cve-2017-6430.patch b/net-analyzer/ettercap/files/cve-2017-6430.patch new file mode 100644 index 00000000000..67483dcc024 --- /dev/null +++ b/net-analyzer/ettercap/files/cve-2017-6430.patch @@ -0,0 +1,68 @@ +From 4ad7f85dc01202e363659aa473c99470b3f4e1f4 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna +Date: Tue, 7 Mar 2017 22:05:31 +0100 +Subject: [PATCH] Fix issue #782 + +--- + utils/etterfilter/ef_compiler.c | 4 +++- + utils/etterfilter/ef_main.c | 10 +++++++--- + utils/etterfilter/ef_output.c | 3 +++ + 3 files changed, 13 insertions(+), 4 deletions(-) + +diff --git a/utils/etterfilter/ef_compiler.c b/utils/etterfilter/ef_compiler.c +index db876636e..ddb73bd30 100644 +--- a/utils/etterfilter/ef_compiler.c ++++ b/utils/etterfilter/ef_compiler.c +@@ -239,7 +239,9 @@ size_t compile_tree(struct filter_op **fop) + struct filter_op *array = NULL; + struct unfold_elm *ue; + +- BUG_IF(tree_root == NULL); ++ // invalid file ++ if (tree_root == NULL) ++ return 0; + + fprintf(stdout, " Unfolding the meta-tree "); + fflush(stdout); +diff --git a/utils/etterfilter/ef_main.c b/utils/etterfilter/ef_main.c +index ae4591344..431084b91 100644 +--- a/utils/etterfilter/ef_main.c ++++ b/utils/etterfilter/ef_main.c +@@ -39,7 +39,7 @@ struct globals *gbls; + + int main(int argc, char *argv[]) + { +- ++ int ret_value = 0; + globals_alloc(); + /* etterfilter copyright */ + fprintf(stdout, "\n" EC_COLOR_BOLD "%s %s" EC_COLOR_END " copyright %s %s\n\n", +@@ -84,8 +84,12 @@ int main(int argc, char *argv[]) + fprintf(stdout, "\n\nThe script contains errors...\n\n"); + + /* write to file */ +- if (write_output() != E_SUCCESS) +- FATAL_ERROR("Cannot write output file (%s)", GBL_OPTIONS->output_file); ++ ret_value = write_output(); ++ if (ret_value == -E_NOTHANDLED) ++ FATAL_ERROR("Cannot write output file (%s): the filter is not correctly handled.", GBL_OPTIONS->output_file); ++ else if (ret_value == -E_INVALID) ++ FATAL_ERROR("Cannot write output file (%s): the filter format is not correct. ", GBL_OPTIONS->output_file); ++ + globals_free(); + return 0; + } +diff --git a/utils/etterfilter/ef_output.c b/utils/etterfilter/ef_output.c +index 5ae591904..fcf19f010 100644 +--- a/utils/etterfilter/ef_output.c ++++ b/utils/etterfilter/ef_output.c +@@ -51,6 +51,9 @@ int write_output(void) + if (fop == NULL) + return -E_NOTHANDLED; + ++ if (ninst == 0) ++ return -E_INVALID; ++ + /* create the file */ + fd = open(GBL_OPTIONS->output_file, O_CREAT | O_RDWR | O_TRUNC | O_BINARY, 0644); + ON_ERROR(fd, -1, "Can't create file %s", GBL_OPTIONS->output_file);