summaryrefslogtreecommitdiff
path: root/net-analyzer/ettercap
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/ettercap')
-rw-r--r--net-analyzer/ettercap/Manifest2
-rw-r--r--net-analyzer/ettercap/ettercap-0.8.2-r1.ebuild62
-rw-r--r--net-analyzer/ettercap/files/cve-2017-6430.patch68
3 files changed, 132 insertions, 0 deletions
diff --git a/net-analyzer/ettercap/Manifest b/net-analyzer/ettercap/Manifest
index 3c5c8faafa94..67dcac6e2b5f 100644
--- a/net-analyzer/ettercap/Manifest
+++ b/net-analyzer/ettercap/Manifest
@@ -1,4 +1,6 @@
+AUX cve-2017-6430.patch 2437 BLAKE2B 4267c1028467734e45f0a2b730498b6b1de86d9aca95377d7afe76d872ae05c0c9c5e600e8c35f7e0f74d00a125cbffce7f372d543e1728a83121c234ef65366 SHA512 fd3477e7ab087d2b0fdfff6ef331ca8ae4aa838ece54a84d4e597d57cf45425a4dc4be60b9caadf0af25ebe8072eea542092e400e6fe219696b0dc13ca4e205b
DIST ettercap-0.8.2.tar.gz 8082561 BLAKE2B 851df0a8700de45ce0e3427f7fdbdcd13feb2f75c0d1136563449db634b1f02276bade0d82a1a51bf8de726d6faddf05ff537e397c2e56cfc3e3181d25566fe9 SHA512 18137b1cc518c9db3c9650157a5cbf09dbb665b79876a24875d6c5125e8923ebde543464adb61cf1d1244101242f4d66b80d94ef3b36aa265cefca7646aa6415
+EBUILD ettercap-0.8.2-r1.ebuild 1714 BLAKE2B 2ffce7cce8e652e21470b00f70ef35d90ef768a9344abbebcbd92bed23ba008794932e622a3c31002651ff64e27336819943c14c92621fdb79b2d30d63da8852 SHA512 dda9381deb9b088fb39b7c1de4f7421b43c231d0c7535428ea148533787ece0a8bf31a93e580cfe108cfebd73da2b0ed1668274fa93d47042b1342447753be56
EBUILD ettercap-0.8.2.ebuild 1660 BLAKE2B 6cf57f82a93894c9bff14d56e823494fd7fd5fcce0285bd19e6316b5db7292e4a19874eccadfaa40ced9e2e3736007e94c30eb96f92f9b3bf714e75dd87f512e SHA512 d8a2b9dc5f6952cbffb15fe18689a7e3587a8d40e52159e65aaea9199f0de43da48bfc6b9c5ee6ab008f24f424d8350b0095246689d7ce36c4cd0a8c9f4f1015
EBUILD ettercap-9999.ebuild 1969 BLAKE2B 22405e3d575543b2b0c0b7b5021e082fd71c60e5d84adad6234904a6dd1524740961ae73844565bf0fb453b3d6ccd9c9af771ddd6d973ee29529a22fb160ffb8 SHA512 d94cd0e2655ba36f02a1fb2431c8902f4b60f3f9389f30631c8dbfc73ebce9021069800f74c97faaf31aa33d4370bb3b523998242b448aa04fa8b5f875d90493
MISC metadata.xml 657 BLAKE2B e32e3fbc55029a9398399a2e2b69974f720826f8769379868ae80e32d2a9b2a69bfeb59b349dae91b7f27a759647091f58ea07a9b23a6dcf32d373966310bdde SHA512 0b682cb596f905882f2c0682c163d31410b94ca873a468db93e155103aeb1e943bff1c55bde1c9537478ce324d368f468bcb91c98f0aefb9dfa2a2239d7f73d5
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 000000000000..71fe6afb63cf
--- /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 000000000000..67483dcc0249
--- /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 <costamagnagianfranco@yahoo.it>
+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);