aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-08-26 18:11:58 -0400
committerLeo Famulari <leo@famulari.name>2016-08-27 20:47:01 -0400
commiteba7fab890f43c2288107170b7dfcf76a63b471f (patch)
tree6324e6ee4ae3198be52f27099e2472d33e96e3b3 /gnu
parent4ea1ad9108d19998f594147daf763aa474c71815 (diff)
downloadpatches-eba7fab890f43c2288107170b7dfcf76a63b471f.tar
patches-eba7fab890f43c2288107170b7dfcf76a63b471f.tar.gz
gnu: flex: Fix CVE-2016-6354.
* gnu/packages/flex.scm (flex)[source]: Add patch. * gnu/packages/patches/flex-CVE-2016-6354.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/flex.scm1
-rw-r--r--gnu/packages/patches/flex-CVE-2016-6354.patch30
3 files changed, 32 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index f24e37146e..9ec0e54b00 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -504,6 +504,7 @@ dist_patch_DATA = \
%D%/packages/patches/findutils-localstatedir.patch \
%D%/packages/patches/findutils-test-xargs.patch \
%D%/packages/patches/flashrom-use-libftdi1.patch \
+ %D%/packages/patches/flex-CVE-2016-6354.patch \
%D%/packages/patches/flint-ldconfig.patch \
%D%/packages/patches/fltk-shared-lib-defines.patch \
%D%/packages/patches/fltk-xfont-on-demand.patch \
diff --git a/gnu/packages/flex.scm b/gnu/packages/flex.scm
index 20aff196e9..c2135a1bc0 100644
--- a/gnu/packages/flex.scm
+++ b/gnu/packages/flex.scm
@@ -36,6 +36,7 @@
(method url-fetch)
(uri (string-append "mirror://sourceforge/flex/flex-"
version ".tar.bz2"))
+ (patches (search-patches "flex-CVE-2016-6354.patch"))
(sha256
(base32
"1sdqx63yadindzafrq1w31ajblf9gl1c301g068s20s7bbpi3ri4"))))
diff --git a/gnu/packages/patches/flex-CVE-2016-6354.patch b/gnu/packages/patches/flex-CVE-2016-6354.patch
new file mode 100644
index 0000000000..1f3cb028d4
--- /dev/null
+++ b/gnu/packages/patches/flex-CVE-2016-6354.patch
@@ -0,0 +1,30 @@
+Fix CVE-2016-6354 (Buffer overflow in generated code (yy_get_next_buffer).
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6354
+https://security-tracker.debian.org/tracker/CVE-2016-6354
+
+Patch copied from upstream source repository:
+https://github.com/westes/flex/commit/a5cbe929ac3255d371e698f62dc256afe7006466
+
+From a5cbe929ac3255d371e698f62dc256afe7006466 Mon Sep 17 00:00:00 2001
+From: Will Estes <westes575@gmail.com>
+Date: Sat, 27 Feb 2016 11:56:05 -0500
+Subject: [PATCH] Fixed incorrect integer type
+
+---
+ src/flex.skl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/flex.skl b/src/flex.skl
+index 36a526a..64f853d 100644
+--- a/src/flex.skl
++++ b/src/flex.skl
+@@ -1703,7 +1703,7 @@ int yyFlexLexer::yy_get_next_buffer()
+
+ else
+ {
+- yy_size_t num_to_read =
++ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )