Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 111525
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Andreas Korthaus <akorthaus@web.de>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 111525 depends on: 119461 Show dependency tree
Bug 111525 blocks:

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-11-04 23:30 0000
SECURITY VULNERABILITY ANNOUNCEMENT
November 4, 2005

     Advisory: PEAR installer arbitrary code execution vulnerability
 Release Date: 2005/11/04
Last Modified: 2005/11/04
       Author: Gregory Beaver [cellog@php.net]

  Application: PEAR installer <= 1.4.2
     Severity: A standard feature of the PEAR installer implemented in
               all versions of PEAR can lead to the execution of
               arbitrary PHP code upon running the "pear" command
               or loading the Web/Gtk frontend.
         Risk: Low
Vendor Status: The PEAR project has released an updated version
   References: http://pear.php.net/advisory-20051104.txt


Overview:

  The PEAR installer is available from http://pear.php.net/package/PEAR.
The PEAR installer is used to install PHP-based software packages
distributed from pear.php.net and PHP extensions from pecl.php.net.  As
of version 1.4.0, the PEAR installer can also install software packages
from other sources, known as "channels."

A poorly-implemented feature allows a package installed by the PEAR
installer to execute arbitrary code any time the "pear" command is
executed or the Web/Gtk frontend is loaded.

Details:

  To be vulnerable, a user must explicitly install a publicly released
malicious package using the PEAR installer, or explicitly install a
package that depends on a malicious package.

Full details of the vulnerability will be released at a later date.

Proof of concept:

  The PEAR development team will not release an example exploit to the
public.

Disclosure Timeline:

  01. November 2005 - vulnerability discovered by Gregory Beaver
  02. November 2005 - possible solutions discussed privately
  03. November 2005 - The PEAR Project releases new bugfixed version
  04. November 2005 - Public disclosure

Recommendation:

  We strongly recommend to upgrade to the new version

  PEAR 1.4.3
  pear upgrade PEAR-1.4.3
  http://pear.php.net/get/PEAR-1.4.3.tgz

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Latest version is 1.4.4, not 1.4.3 (patched version did not work with PHP 4.2).

The pear installer is included in all php-archives. All php ebuilds depend on
vulnable PEAR versions, if "pear" USE flag is set. 

pear? ( >=dev-php/PEAR-PEAR-1.3.6 )

http://greg.chiaraquartet.net/archives/99-Security-Vulnerability-in-all-PEAR-versions-prior-to-1.4.3-discovered.html

------- Comment #1 From Sune Kloppenborg Jeppesen 2005-11-04 23:33:44 0000 -------
php please advise. 

------- Comment #2 From Sebastian Bergmann (RETIRED) 2005-11-05 00:04:35 0000 -------
We have an ebuild for PEAR 1.4.X in our SVN Overlay, but that still needs some
work/testing PEAR 1.4.0 introduced a lot of changes to the PEAR infrastructure.

------- Comment #3 From Andreas Korthaus 2005-11-05 00:26:39 0000 -------
I added an ebuild for PEAR-1.4.4 there, but as Sebastian wrote, PEAR-1.4
ebuilds
are in experimental tree of the overlay.

http://svn.gnqs.org/projects/gentoo-php-overlay/browser/experimental/dev-php/PEAR-PEAR/

------- Comment #4 From Thierry Carrez (RETIRED) 2005-11-05 09:45:09 0000 -------
"To be vulnerable, a user must explicitly install a publicly released malicious
package using the PEAR installer, or explicitly install a package that depends
on a malicious package."

If you install a malicious package, it's probably to run the code in it, so
you're pretty much already 0wned...

------- Comment #5 From Thierry Carrez (RETIRED) 2005-11-06 10:50:48 0000 -------
Anyway, this is minor, but should nevertheless be fixed. It can wait until it
is
de-experimentalized, I suppose.

------- Comment #6 From Sune Kloppenborg Jeppesen 2005-12-05 12:42:28 0000 -------
Any news on this one? 

------- Comment #7 From Thierry Carrez (RETIRED) 2005-12-09 06:58:25 0000 -------
Hm, any ETA for having latest PEAR in ? Otherwise I would just close this one,
it sucks anyway.

------- Comment #8 From Thierry Carrez (RETIRED) 2005-12-14 07:29:54 0000 -------
Bah, closing as wontfix, see comment #4. Feel free to upgrade the package
though.

------- Comment #9 From Andreas Korthaus 2006-01-06 17:18:53 0000 -------
FYI:
http://greg.chiaraquartet.net/archives/107-Why-it-is-very-important-to-upgrade-to-PEAR-1.4.6-from-PEAR-1.3.x.html

------- Comment #10 From Jakub Moc (RETIRED) 2006-01-08 02:20:28 0000 -------
*** Bug 118262 has been marked as a duplicate of this bug. ***

------- Comment #11 From Stefan Cornelius (RETIRED) 2006-01-08 09:52:45 0000 -------
reopening like requested because of new information about the issue, waiting
for ebuilds.

------- Comment #12 From Thierry Carrez (RETIRED) 2006-01-12 08:26:39 0000 -------
PHP herd, what would be your opinion on this ? I don't find the
Why-it-is-very-important-to-upgrade-to-PEAR-1.4.6-from-PEAR-1.3.x.html very
convincing.

------- Comment #13 From Luca Longinotti 2006-01-12 08:54:16 0000 -------
Yeah, we'll anyway to try to have PEAR 1.4.X in the tree soon, as it is a
"better" PEAR installer than 1.3.X, and it fixes the security bugs, but atm
it's a no-go: only >=1.4.6 has the --packagingroot directive wich we need to
let PEAR packages be built correctly in the sandbox, but atm PEAR 1.4.6 only
gives us a Fatal Error and dies, so we can't really ship that... :) We'll try
to fix that and have a working PEAR 1.4.X in the tree soon, I hope.
Best regards, CHTEKK.

------- Comment #14 From Thierry Carrez (RETIRED) 2006-01-13 06:49:42 0000 -------
There is also this thing, from Bugtraq... Not sure how accessible it is though.

=========================
A vulnerability exists within version 0.2.2 of go-pear.php, part of PHP's PEAR
Package. 
The problem lies in the scripts capacity to utilize a proxy server.

An attacker can take advantage of this option by providing it with a malicious
proxy server
that is configured to redirect the original request to another file server. 
By simply mirroring the requested content from the intended file server 
the attacker can assure the script continues running uninterrupted.

Hosting a modified version of "Tar.php" and pre pending code to the
extractModify() function
will allow the attacker to run any PHP code of their choosing. This occurs
because go-pear uses
"Tar.php" to extract all the packages it previously retrieved, in doing so it
invokes the now
compromised version of extractModify().
=====================================

------- Comment #15 From Luca Longinotti 2006-01-21 04:02:36 0000 -------
UPDATE: we got PEAR-1.4.6 working on the PHP Overlay, I'll do some more testing
today and move it to the testing/ branch of the overlay, and then to Portage
CVS on monday if there are no problems found. Once it's in Portage, I'll update
this bug and we can see to have the arch-teams keyword it appropriately.
Best regards, CHTEKK.

------- Comment #16 From Sebastian Bergmann (RETIRED) 2006-01-21 04:05:09 0000 -------
Great news, Luca. Could you look at the issue I emailed you about (eZ
components channel registration)? Thanks!

------- Comment #17 From Sebastian Bergmann (RETIRED) 2006-01-23 06:39:27 0000 -------
dev-php/PEAR-PEAR-1.4.6 is in the tree now.

------- Comment #18 From Stefan Cornelius (RETIRED) 2006-01-23 10:11:40 0000 -------
arches - please test and mark stable, thx.

------- Comment #19 From Mark Loeser 2006-01-23 13:28:10 0000 -------
x86 done

------- Comment #20 From Markus Rothe 2006-01-23 13:36:50 0000 -------
stable on ppc64

------- Comment #21 From Gustavo Zacarias (RETIRED) 2006-01-23 17:04:13 0000 -------
sparc stable.

------- Comment #22 From Tobias Scherbaum 2006-01-24 06:32:46 0000 -------
ppc stable

------- Comment #23 From Jeroen Roovers 2006-01-24 12:49:44 0000 -------
Marked ~hppa.

------- Comment #24 From Simon Stelling (RETIRED) 2006-01-24 14:07:38 0000 -------
amd64 stable

------- Comment #25 From Stefan Cornelius (RETIRED) 2006-01-24 14:24:21 0000 -------
re-CCing hppa as the keyword was removed by the php team to prohobit problems
because of other packages that need to be stabled first, see bug #119461 for
details.

------- Comment #26 From René Nussbaumer 2006-01-25 12:52:58 0000 -------
We (hppa) have some problems with php at the moment. Because we aren't php 5
ready. I hope we'll fix it soon.

------- Comment #27 From Bryan Østergaard (RETIRED) 2006-01-25 15:48:24 0000 -------
Alpha stable.

------- Comment #28 From Jakub Moc (RETIRED) 2006-01-26 00:55:36 0000 -------
(In reply to comment #26)
> We (hppa) have some problems with php at the moment. Because we aren't php 5
> ready. I hope we'll fix it soon.

Killerfox, if you have issues w/ php-5 on hppa, please keyword dev-lang/php-4
(and related ebuilds) only meanwhile, you don't need php-5 keyworded for
PEAR-PEAR-1.4.6-r1. Thanks.

------- Comment #29 From Jeroen Roovers 2006-01-26 12:49:41 0000 -------
Marked stable on hppa. Removing CC.

------- Comment #30 From Stefan Cornelius (RETIRED) 2006-01-26 14:59:01 0000 -------
let's better have a glsa vote here ... i have no opinion yet, need to re-read
all the dirty details before

------- Comment #31 From Sune Kloppenborg Jeppesen 2006-01-30 13:41:35 0000 -------
I vote NO.

------- Comment #32 From Daniel Black 2006-02-06 12:16:47 0000 -------
concur - vote=no glsa

------- Comment #33 From Thierry Carrez (RETIRED) 2006-02-07 10:16:55 0000 -------
Voting no and closing, this one doesn't smell right, see my comment #4

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug