Skip to contentSkip to conversation

python: fix for Security Advisory - python - CVE-2012-2135

PATCH In review yanjun.zhu 3 participants 7 messages Nov 16, 2012 – Nov 30, 2012

lore
Share & tools
lore

yanjun.zhu

author
#0 lore raw

PATCH 1/1 python: fix for Security Advisory - python - CVE-2012-2135

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

---
 .../python/python/python-2.7.2-CVE-2012-2135.patch |   12 ++++++++++++
 recipes-devtools/python/python_2.7.2.bbappend      |    1 +
 2 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 recipes-devtools/python/python/python-2.7.2-CVE-2012-2135.patch
recipes-devtools/python/python/python-2.7.2-CVE-2012-2135.patch new file +12 -0
new file mode 100644
index 0000000..b913097
@@ -0,0 +1,12 @@
+diff -urpN a/Objects/unicodeobject.c b/Objects/unicodeobject.c
+--- a/Objects/unicodeobject.c	2012-11-12 16:25:33.000000000 +0800
++++ b/Objects/unicodeobject.c	2012-11-12 16:26:22.000000000 +0800
+@@ -2568,7 +2568,7 @@ PyUnicode_DecodeUTF16Stateful(const char
+         }
+ 
+         /* UTF-16 code pair: */
+-        if (q >= e) {
++        if (e - q < 2) {
+             errmsg = "unexpected end of data";
+             startinpos = (((const char *)q)-2)-starts;
+             endinpos = ((const char *)e)-starts;
recipes-devtools/python/python_2.7.2.bbappend +1 -0
index 87be410..64ada6c 100644
@@ -5,5 +5,6 @@ SRC_URI += "\
     file://python-CVE-2010-3492.patch \
     file://python-2.7.2-CVE-2012-0845.patch \
     file://python-2.7.2-CVE-2012-1150.patch \
+    file://python-2.7.2-CVE-2012-2135.patch \
 "
 PRINC = "2"
Signature · 1 line
1.6.3.1
#1 lore raw
Quoted 10 lines · yanjun.zhu

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

I think this needs to be backported to previous releases, right?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
author
#2 lore raw
Quoted 8 lines · Otavio Salvador
Quoted 6 lines · yanjun.zhu

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.

Quoted 5 lines
Quoted 4 lines

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2135

I think this needs to be backported to previous releases, right?

Hi, Otavio

OK. I will do it.

Thanks a lot.
Zhu Yanjun

author
#3 lore raw
Quoted 13 lines · On 11/19/2012 10:26 AM, yzhu1 wrote:
Quoted 12 lines · Otavio Salvador
Quoted 10 lines · yanjun.zhu

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

Quoted 9 lines
Quoted 1 line

I think this needs to be backported to previous releases, right?

Hi, Otavio

OK. I will do it.

Thanks a lot.
Zhu Yanjun

Hi, Otavio

Sorry. I do not know what is the previous releases. Do you mean denzil branch or others? Would you like to make it clear?

Thanks a lot.
Zhu Yanjun

Quoted 5 lines

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#4 lore raw
Quoted 29 lines · On Mon, Nov 19, 2012 at 12:36 AM, yzhu1 <[email protected]> wrote:
Quoted 27 lines · On 11/19/2012 10:26 AM, yzhu1 wrote:
Quoted 17 lines · Otavio Salvador

On Fri, Nov 16, 2012 at 6:53 AM, yanjun.zhu <[email protected]>** wrote:

The utf-16 decoder in Python 3.1 through 3.3 does not update the

Quoted 12 lines

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<http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2135>

I think this needs to be backported to previous releases, right?

Hi, Otavio

OK. I will do it.

Thanks a lot.
Zhu Yanjun

Quoted 5 lines
Quoted 1 line

Hi, Otavio

Sorry. I do not know what is the previous releases. Do you mean denzil branch or others?
Would you like to make it clear?

Yes, I meant denzil and danny (both released and maintained for now).

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#5 lore raw
In reply to yanjun.zhu
Quoted 8 lines · On Friday 16 November 2012 16:53:42 yanjun.zhu wrote:

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

Quoted 7 lines
---
 .../python/python/python-2.7.2-CVE-2012-2135.patch |   12 ++++++++++++
 recipes-devtools/python/python_2.7.2.bbappend      |    1 +
 2 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644

recipes-devtools/python/python/python-2.7.2-CVE-2012-2135.patch

This patch is also against OE-Core, could you send this to the OE-Core list as well?

Thanks,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
author
#6 lore raw
Quoted 16 lines · Paul Eggleton
Quoted 8 lines · On Friday 16 November 2012 16:53:42 yanjun.zhu wrote:

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

Quoted 7 lines
---
  .../python/python/python-2.7.2-CVE-2012-2135.patch |   12 ++++++++++++
  recipes-devtools/python/python_2.7.2.bbappend      |    1 +
  2 files changed, 13 insertions(+), 0 deletions(-)

create mode 100644
recipes-devtools/python/python/python-2.7.2-CVE-2012-2135.patch

Quoted 2 lines

This patch is also against OE-Core, could you send this to the OE-Core list as well?

OK. I will follow your advice.

Thanks a lot.
Zhu Yanjun

Quoted 3 lines

Thanks,
Paul