diff options
author | yanjun.zhu <yanjun.zhu@windriver.com> | 2012-11-30 19:23:48 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-01 15:38:47 +0000 |
commit | 8cb87526627b9820a9be5698c084df788a433a7b (patch) | |
tree | 873ef8f51862efc621e571fee6c372e56e5d7aa7 /meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch | |
parent | 9abe92ec1c0cfbd285d0ca63cee5e0f35d0f35e1 (diff) | |
download | poky-8cb87526627b9820a9be5698c084df788a433a7b.tar.gz |
Python: Fix for CVE-2012-2135
Reference:http://http://bugs.python.org/issue14579
The utf-16 decoder in Python 3.1 through 3.3 does not update the
aligned_end variable after calling the unicode_decode_call_errorhandler
function, which allows remote attackers to obtain sensitive information
(process memory) or cause a denial of service (memory corruption and crash)
via unspecified vectors.
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2135
[YOCTO #3450]
(From OE-Core rev: 11544f573bc94ce69a8a76d645e46ab6359dee78)
Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch')
-rw-r--r-- | meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch | 24 |
1 files changed, 24 insertions, 0 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 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Reference:http://bugs.python.org/issue14579 | ||
4 | |||
5 | The utf-16 decoder in Python 3.1 through 3.3 does not update the | ||
6 | aligned_end variable after calling the unicode_decode_call_errorhandler | ||
7 | function, which allows remote attackers to obtain sensitive information | ||
8 | (process memory) or cause a denial of service (memory corruption and crash) | ||
9 | via unspecified vectors. | ||
10 | |||
11 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2135 | ||
12 | Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> | ||
13 | diff -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; | ||