summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python/CVE-2016-5636.patch
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2016-11-06 10:36:07 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-06 22:46:44 +0000
commit6976f01adc204790382a0df55cfba361695d803e (patch)
treed217f0119e9e876974d3714931b2ffb85f048764 /meta/recipes-devtools/python/python/CVE-2016-5636.patch
parent867babeb6fcad2ac5497b4e36d622ff33c11908c (diff)
downloadpoky-6976f01adc204790382a0df55cfba361695d803e.tar.gz
python-2.7: Security fix CVE-2016-5636
Affects python-2.7 < 2.7.12 (From OE-Core rev: d25b86ce8f2712d02bb7cde78d7f9ea5a57a7770) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python/CVE-2016-5636.patch')
-rw-r--r--meta/recipes-devtools/python/python/CVE-2016-5636.patch42
1 files changed, 42 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 0000000000..5906153d31
--- /dev/null
+++ b/meta/recipes-devtools/python/python/CVE-2016-5636.patch
@@ -0,0 +1,42 @@
1
2# HG changeset patch
3# User Benjamin Peterson <benjamin@python.org>
4# Date 1453357424 28800
5# Node ID 985fc64c60d6adffd1138b6cc46df388ca91ca5d
6# Parent 7ec954b9fc54448a35b56d271340ba109eb381b9
7prevent buffer overflow in get_data (closes #26171)
8
9Upstream-Status: Backport
10CVE: CVE-2016-5636
11Signed-off-by: Armin Kuster <akuster@mvista.com>
12
13Index: Python-2.7.9/Misc/NEWS
14===================================================================
15--- Python-2.7.9.orig/Misc/NEWS
16+++ Python-2.7.9/Misc/NEWS
17@@ -7,6 +7,9 @@ What's New in Python 2.7.9?
18
19 *Release date: 2014-12-10*
20
21+- Issue #26171: Fix possible integer overflow and heap corruption in
22+ zipimporter.get_data().
23+
24 Library
25 -------
26
27Index: Python-2.7.9/Modules/zipimport.c
28===================================================================
29--- Python-2.7.9.orig/Modules/zipimport.c
30+++ Python-2.7.9/Modules/zipimport.c
31@@ -895,6 +895,11 @@ get_data(char *archive, PyObject *toc_en
32 PyMarshal_ReadShortFromFile(fp); /* local header size */
33 file_offset += l; /* Start of file data */
34
35+ if (data_size > LONG_MAX - 1) {
36+ fclose(fp);
37+ PyErr_NoMemory();
38+ return NULL;
39+ }
40 raw_data = PyString_FromStringAndSize((char *)NULL, compress == 0 ?
41 data_size : data_size + 1);
42 if (raw_data == NULL) {