summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZero_Chaos <zerochaos@gentoo.org>2018-02-24 00:06:02 -0500
committerZero_Chaos <zerochaos@gentoo.org>2018-02-24 00:06:02 -0500
commit30594418a8d35519a5a055157ea8be27d8c49e9f (patch)
treec0f44be65d8b7fa87bfe55c43ff5bce3f8ee874a /net-analyzer/ettercap/files
parentwww-apps/radicale: Security cleanup (bug #618176) (diff)
downloadgentoo-30594418a8d35519a5a055157ea8be27d8c49e9f.tar.gz
gentoo-30594418a8d35519a5a055157ea8be27d8c49e9f.tar.bz2
gentoo-30594418a8d35519a5a055157ea8be27d8c49e9f.zip
net-analyzer/ettercap: bug #612226
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'net-analyzer/ettercap/files')
-rw-r--r--net-analyzer/ettercap/files/cve-2017-6430.patch68
1 files changed, 68 insertions, 0 deletions
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);