Audit Linux privileges now to limit compromise, escalation, and system-wide damage. Review Linux Privileges×

Alerts This Week
Warning Icon 1 515
Alerts This Week
Warning Icon 1 515

Red Hat Enterprise: RHSA-2012-0744-01 Moderate: Python DoS And XSS

red hat
Calendar Grey June 18, 2012
Scroller Redhat
A recent security patch from Red Hat for Python targets numerous vulnerabilities affecting diverse software on RHEL 6.
Updated python packages that fix multiple security issues are now available for Red Hat Enterprise Linux 6

Solution

Before applying this update, make sure all previously-released errata relevant to your system have been applied.

This update is available via the Red Hat Network. Details on how to use the Red Hat Network to apply this update are available at https://access.redhat.com/articles/11258

Summary

Python is an interpreted, interactive, object-oriented programming language.
A denial of service flaw was found in the implementation of associative arrays (dictionaries) in Python. An attacker able to supply a large number of inputs to a Python application (such as HTTP POST request parameterssent to a web application) that are used as keys when inserting data into an array could trigger multiple hash function collisions, making array operations take an excessive amount of CPU time. To mitigate this issue, randomization has been added to the hash function to reduce the chance of an attacker successfully causing intentional collisions. (CVE-2012-1150)
Note: The hash randomization is not enabled by default as it may break applications that incorrectly depend on dictionary ordering. To enable the protection, the new "PYTHONHASHSEED" environment variable or the Python interpreter's "-R" command line option can be used. Refer to the python(1) manual page for details.
The RHSA-2012:0731 expat erratum must be installed with this update, which adds hash randomization to the Expat library used by the Python pyexpat module.
A flaw was found in the way the Python SimpleXMLRPCServer module handled clients disconnecting prematurely. A remote attacker could use this flaw to cause excessive CPU consumption on a server using SimpleXMLRPCServer. (CVE-2012-0845)
A flaw was found in the way the Python SimpleHTTPServer module generated directory listings. An attacker able to upload a file with a specially-crafted name to a server could possibly perform a cross-site scripting (XSS) attack against victims visiting a listing page generated by SimpleHTTPServer, for a directory containing the crafted file (if the victims were using certain web browsers). (CVE-2011-4940)
A race condition was found in the way the Python distutils module set file permissions during the creation of the .pypirc file. If a local user had access to the home directory of another user who is running distutils, they could use this flaw to gain access to that user's .pypirc file, which can contain usernames and passwords for code repositories. (CVE-2011-4944)
Red Hat would like to thank oCERT for reporting CVE-2012-1150. oCERT acknowledges Julian Wälde and Alexander Klink as the original reporters of CVE-2012-1150.
All Python users should upgrade to these updated packages, which contain backported patches to correct these issues.

References

https://access.redhat.com/security/cve/CVE-2011-4940 https://access.redhat.com/security/cve/CVE-2011-4944 https://access.redhat.com/security/cve/CVE-2012-0845 https://access.redhat.com/security/cve/CVE-2012-1150 https://access.redhat.com/security/updates/classification#moderate http://ocert.org/advisories/ocert-2011-003.html https://access.redhat.com/errata/RHSA-2012:0731.html

Package List

Red Hat Enterprise Linux Desktop (v. 6):
Source:
i386: python-2.6.6-29.el6_2.2.i686.rpm python-debuginfo-2.6.6-29.el6_2.2.i686.rpm python-libs-2.6.6-29.el6_2.2.i686.rpm tkinter-2.6.6-29.el6_2.2.i686.rpm
x86_64: python-2.6.6-29.el6_2.2.x86_64.rpm python-debuginfo-2.6.6-29.el6_2.2.x86_64.rpm python-libs-2.6.6-29.el6_2.2.x86_64.rpm tkinter-2.6.6-29.el6_2.2.x86_64.rpm
Red Hat Enterprise Linux Desktop Optional (v. 6):
Source:
i386: python-debuginfo-2.6.6-29.el6_2.2.i686.rpm python-devel-2.6.6-29.el6_2.2.i686.rpm python-test-2.6.6-29.el6_2.2.i686.rpm python-tools-2.6.6-29.el6_2.2.i686.rpm
x86_64: python-debuginfo-2.6.6-29.el6_2.2.x86_64.rpm python-devel-2.6.6-29.el6_2.2.x86_64.rpm python-test-2.6.6-29.el6_2.2.x86_64.rpm python-tools-2.6.6-29.el6_2.2.x86_64.rpm
Red Hat Enterprise Linux HPC Node (v. 6):
Source:
x86_64: python-2.6.6-29.el6_2.2.x86_64.rpm python-debuginfo-2.6.6-29.el6_2.2.x86_64.rpm python-libs-2.6.6-29.el6_2.2.x86_64.rpm
Red Hat Enterprise Linux HPC Node Optional (v. 6):
Source:
x86_64: python-debuginfo-2.6.6-29.el6_2.2.x86_64.rpm python-devel-2.6.6-29.el6_2.2.x86_64.rpm python-test-2.6.6-29.el6_2.2.x86_64.rpm python-tools-2.6.6-29.el6_2.2.x86_64.rpm tkinter-2.6.6-29.el6_2.2.x86_64.rpm
Red Hat Enterprise Linux Server (v. 6):
Source:
i386: python-2.6.6-29.el6_2.2.i686.rpm

Read the Full Advisory


Advisory ID: RHSA-2012:0744-01
Product: Red Hat Enterprise Linux
Issue date: 2012-06-18

Topic

Updated python packages that fix multiple security issues are now availablefor Red Hat Enterprise Linux 6.The Red Hat Security Response Team has rated this update as having moderatesecurity impact. Common Vulnerability Scoring System (CVSS) base scores,which give detailed severity ratings, are available for each vulnerabilityfrom the CVE links in the References section.

Relevant Releases Architectures

Red Hat Enterprise Linux Desktop (v. 6) - i386, x86_64

Red Hat Enterprise Linux Desktop Optional (v. 6) - i386, x86_64

Red Hat Enterprise Linux HPC Node (v. 6) - x86_64

Red Hat Enterprise Linux HPC Node Optional (v. 6) - x86_64

Red Hat Enterprise Linux Server (v. 6) - i386, ppc64, s390x, x86_64

Red Hat Enterprise Linux Server Optional (v. 6) - i386, ppc64, s390x, x86_64

Red Hat Enterprise Linux Workstation (v. 6) - i386, x86_64

Red Hat Enterprise Linux Workstation Optional (v. 6) - i386, x86_64

Bugs Fixed

750555 - CVE-2012-1150 python: hash table collisions CPU usage DoS (oCERT-2011-003)

758905 - CVE-2011-4944 python: distutils creates ~/.pypirc insecurely

789790 - CVE-2012-0845 python: SimpleXMLRPCServer CPU usage DoS via malformed XML-RPC request

803500 - CVE-2011-4940 python: potential XSS in SimpleHTTPServer's list_directory()

Get the latest News and Insights

Get the latest Linux and open source security news straight to your inbox.