summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch24
-rw-r--r--meta/recipes-devtools/python/python_2.7.3.bb3
2 files changed, 26 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch
new file mode 100644
index 0000000000..ad118b04d9
--- /dev/null
+++ b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch
@@ -0,0 +1,24 @@
1Upstream-Status: Backport
2
3Reference:http://bugs.python.org/issue14579
4
5The utf-16 decoder in Python 3.1 through 3.3 does not update the
6aligned_end variable after calling the unicode_decode_call_errorhandler
7function, which allows remote attackers to obtain sensitive information
8(process memory) or cause a denial of service (memory corruption and crash)
9via unspecified vectors.
10
11http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2135
12Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
13diff -urpN a/Objects/unicodeobject.c b/Objects/unicodeobject.c
14--- a/Objects/unicodeobject.c 2012-11-12 16:25:33.000000000 +0800
15+++ b/Objects/unicodeobject.c 2012-11-12 16:26:22.000000000 +0800
16@@ -2568,7 +2568,7 @@ PyUnicode_DecodeUTF16Stateful(const char
17 }
18
19 /* UTF-16 code pair: */
20- if (q >= e) {
21+ if (e - q < 2) {
22 errmsg = "unexpected end of data";
23 startinpos = (((const char *)q)-2)-starts;
24 endinpos = ((const char *)e)-starts;
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index 3eb36fc9aa..1968629f11 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -1,6 +1,6 @@
1require python.inc 1require python.inc
2DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" 2DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
3PR = "${INC_PR}.2" 3PR = "${INC_PR}.3"
4 4
5DISTRO_SRC_URI ?= "file://sitecustomize.py" 5DISTRO_SRC_URI ?= "file://sitecustomize.py"
6DISTRO_SRC_URI_linuxstdbase = "" 6DISTRO_SRC_URI_linuxstdbase = ""
@@ -27,6 +27,7 @@ SRC_URI += "\
27 file://avoid_warning_for_sunos_specific_module.patch \ 27 file://avoid_warning_for_sunos_specific_module.patch \
28 file://python-2.7.3-berkeley-db-5.3.patch \ 28 file://python-2.7.3-berkeley-db-5.3.patch \
29 file://python-2.7.3-remove-bsdb-rpath.patch \ 29 file://python-2.7.3-remove-bsdb-rpath.patch \
30 file://python-2.7.3-CVE-2012-2135.patch \
30" 31"
31 32
32S = "${WORKDIR}/Python-${PV}" 33S = "${WORKDIR}/Python-${PV}"