aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2016-11-06 10:36:07 -0800
committerRobert Yang <liezhi.yang@windriver.com>2016-12-06 05:19:39 -0800
commitd25b86ce8f2712d02bb7cde78d7f9ea5a57a7770 (patch)
tree34a1570410aa2516175e9784c0baa97fedb6f021
parentdd1a22f4beeb4100388efdc072e7cff2025535a7 (diff)
downloadopenembedded-core-d25b86ce8f2712d02bb7cde78d7f9ea5a57a7770.zip
openembedded-core-d25b86ce8f2712d02bb7cde78d7f9ea5a57a7770.tar.gz
openembedded-core-d25b86ce8f2712d02bb7cde78d7f9ea5a57a7770.tar.bz2
python-2.7: Security fix CVE-2016-5636
Affects python-2.7 < 2.7.12 Signed-off-by: Armin Kuster <akuster@mvista.com>
-rw-r--r--meta/recipes-devtools/python/python/CVE-2016-5636.patch42
-rw-r--r--meta/recipes-devtools/python/python_2.7.9.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python/CVE-2016-5636.patch b/meta/recipes-devtools/python/python/CVE-2016-5636.patch
new file mode 100644
index 0000000..5906153
--- /dev/null
+++ b/meta/recipes-devtools/python/python/CVE-2016-5636.patch
@@ -0,0 +1,42 @@
+
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1453357424 28800
+# Node ID 985fc64c60d6adffd1138b6cc46df388ca91ca5d
+# Parent 7ec954b9fc54448a35b56d271340ba109eb381b9
+prevent buffer overflow in get_data (closes #26171)
+
+Upstream-Status: Backport
+CVE: CVE-2016-5636
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: Python-2.7.9/Misc/NEWS
+===================================================================
+--- Python-2.7.9.orig/Misc/NEWS
++++ Python-2.7.9/Misc/NEWS
+@@ -7,6 +7,9 @@ What's New in Python 2.7.9?
+
+ *Release date: 2014-12-10*
+
++- Issue #26171: Fix possible integer overflow and heap corruption in
++ zipimporter.get_data().
++
+ Library
+ -------
+
+Index: Python-2.7.9/Modules/zipimport.c
+===================================================================
+--- Python-2.7.9.orig/Modules/zipimport.c
++++ Python-2.7.9/Modules/zipimport.c
+@@ -895,6 +895,11 @@ get_data(char *archive, PyObject *toc_en
+ PyMarshal_ReadShortFromFile(fp); /* local header size */
+ file_offset += l; /* Start of file data */
+
++ if (data_size > LONG_MAX - 1) {
++ fclose(fp);
++ PyErr_NoMemory();
++ return NULL;
++ }
+ raw_data = PyString_FromStringAndSize((char *)NULL, compress == 0 ?
+ data_size : data_size + 1);
+ if (raw_data == NULL) {
diff --git a/meta/recipes-devtools/python/python_2.7.9.bb b/meta/recipes-devtools/python/python_2.7.9.bb
index 53ec991..3b3e7ad 100644
--- a/meta/recipes-devtools/python/python_2.7.9.bb
+++ b/meta/recipes-devtools/python/python_2.7.9.bb
@@ -27,6 +27,7 @@ SRC_URI += "\
file://use_sysroot_ncurses_instead_of_host.patch \
file://avoid_parallel_make_races_on_pgen.patch \
file://CVE-2016-0772.patch \
+ file://CVE-2016-5636.patch \
"
S = "${WORKDIR}/Python-${PV}"