Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1519595 - (CVE-2017-1000158) CVE-2017-1000158 python: Integer overflow in PyString_DecodeEscape results in heap-base buffer overflow
CVE-2017-1000158 python: Integer overflow in PyString_DecodeEscape results in...
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20170613,repor...
: Security
Depends On: 1519601 1519602 1519603 1519604 1519605 1519606
Blocks: 1519600
  Show dependency treegraph
 
Reported: 2017-11-30 20:19 EST by Sam Fowler
Modified: 2018-03-15 09:40 EDT (History)
23 users (show)

See Also:
Fixed In Version: python 2.7.14
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-08 14:02:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sam Fowler 2017-11-30 20:19:14 EST
In Python 2.7, Python 3.4 and Python 3.5 there is a possible integer overflow in PyString_DecodeEscape function of the file stringobject.c, which can be abused to gain a heap overflow, possibly leading to arbitrary code execution.

References:
https://bugs.python.org/issue30657
http://python-security.readthedocs.io/vuln/cve-2017-1000158_pystring_decodeescape_integer_overflow.html
https://github.com/python/cpython/commit/c3c9db89273fabc62ea1b48389d9a3000c1c03ae
Comment 1 Sam Fowler 2017-11-30 20:45:18 EST
Created python tracking bugs for this issue:

Affects: fedora-all [bug 1519606]


Created python26 tracking bugs for this issue:

Affects: fedora-all [bug 1519602]


Created python3 tracking bugs for this issue:

Affects: fedora-all [bug 1519604]


Created python33 tracking bugs for this issue:

Affects: fedora-all [bug 1519605]


Created python34 tracking bugs for this issue:

Affects: fedora-all [bug 1519601]


Created python35 tracking bugs for this issue:

Affects: fedora-all [bug 1519603]
Comment 2 Pedro Yóssis Silva Barbosa 2017-12-08 13:22:54 EST
External References:

http://python-security.readthedocs.io/vuln/cve-2017-1000158_pystring_decodeescape_integer_overflow.html
Comment 6 Pedro Yóssis Silva Barbosa 2017-12-08 14:03:10 EST
Statement:

This issue affects the versions of python as shipped with Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 7, and python27-python, rh-python34-python, and rh-python35-python as shipped with Red Hat Software Collections 3. Red Hat Product Security has rated this issue as having Moderate security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.
Comment 9 Pedro Yóssis Silva Barbosa 2017-12-11 07:24:18 EST
Upstream commit:

https://github.com/python/cpython/commit/c3c9db89273fabc62ea1b48389d9a3000c1c03ae
Comment 13 Pedro Yóssis Silva Barbosa 2018-03-15 09:17:51 EDT
"You need to compile a 1 GiB Python file on 32-bit system for reproducing it. It is very unlikely that this can happen by accident, and it is hard to used it in security attack. If you can make the attacked program compiling a 1 GiB Python file, you perhaps have easier ways to make a harm."

Ref: http://python-security.readthedocs.io/vuln/cve-2017-1000158_pystring_decodeescape_integer_overflow.html

"In the highly unlikely but definitely possible situation that we pass it a very large string (in the order of ~1GB on a 32-bit Python install), one can reliably get heap corruption."

Ref: https://bugs.python.org/msg295930

Note You need to log in before you can comment on or make changes to this bug.