Bug 681982 (CVE-2011-1072, CVE-2011-1144)

Summary: CVE-2011-1072 CVE-2011-1144 php-pear: symlink vulnerability in PEAR installer
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: ddumas, fedora, jlieskov, jorton, ldimaggi, rpm
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-07 09:04:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 681983, 750438    
Bug Blocks: 734217    

Description Vincent Danen 2011-03-03 19:05:25 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2011-1072 to
the following vulnerability:

Name: CVE-2011-1072
URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-1072
Assigned: 20110224
Reference: http://openwall.com/lists/oss-security/2011/02/28/3
Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546164
Reference: http://news.php.net/php.pear.cvs/61264
Reference: http://pear.php.net/advisory-20110228.txt
Reference: http://pear.php.net/bugs/bug.php?id=18056
Reference: http://security-tracker.debian.org/tracker/CVE-2011-1072
Reference: http://svn.php.net/viewvc?view=revision&revision=308687
Reference: http://www.securityfocus.com/bid/46605
Reference: http://secunia.com/advisories/43533
Reference: http://xforce.iss.net/xforce/xfdb/65721

The installer in PEAR before 1.9.2 allows local users to overwrite
arbitrary files via a symlink attack on the package.xml file, related
to the (1) download_dir, (2) cache_dir, (3) tmp_dir, and (4)
pear-build-download directories, a different vulnerability than
CVE-2007-2519.


Note that PEAR 1.9.2 did not fully correct the issue, and MITRE assigned CVE-2011-1144 to that:

The installer in PEAR 1.9.2 and earlier allows local users to
overwrite arbitrary files via a symlink attack on the package.xml
file, related to the (1) download_dir, (2) cache_dir, (3) tmp_dir, and
(4) pear-build-download directories.  NOTE: this vulnerability exists
because of an incomplete fix for CVE-2011-1072.

References to the incomplete fix:

http://openwall.com/lists/oss-security/2011/03/01/9

So if we do update to 1.9.2 without the full fix, then CVE-2011-1144 applies as 1.9.2 contains an incomplete fix.

It also does not look like older versions of PEAR (e.g. 1.4.9 as found in Red Hat Enterprise Linux 5) are vulnerable as there is no specific download directory or temporary directory specifications used (download_dir, temp_dir), and the default cache directory is /var/cache/php-pear which is owned root:root and mode 0755 (not a world-writable /tmp).

Comment 1 Vincent Danen 2011-03-03 19:09:31 UTC
Created php-pear tracking bugs for this issue

Affects: fedora-all [bug 681983]

Comment 2 Vincent Danen 2011-03-12 00:11:22 UTC
This has been further fixed upstream (so this would be the fix for CVE-2011-1144):

http://svn.php.net/viewvc?view=revision&revision=309042

This, in addition to the previous changes, would be required to fully fix CVE-2011-1072.

Comment 8 errata-xmlrpc 2011-12-06 18:43:54 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:1741 https://rhn.redhat.com/errata/RHSA-2011-1741.html