Security Advisory Moderate: php security update

Advisory: RHSA-2008:0546-3
Type: Security Advisory
Severity: Moderate
Issued on: 2008-07-16
Last updated on: 2008-07-16
Affected Products: Red Hat Enterprise Linux AS (v. 2.1)
Red Hat Enterprise Linux ES (v. 2.1)
Red Hat Enterprise Linux WS (v. 2.1)
Red Hat Linux Advanced Workstation 2.1 for the Itanium Processor
OVAL: N/A
CVEs (cve.mitre.org): CVE-2006-7228
CVE-2007-1660
CVE-2007-5898
CVE-2007-5899
CVE-2008-2051
CVE-2008-2107
CVE-2008-2108

Details

Updated PHP packages that fix several security issues are now available for
Red Hat Enterprise Linux 2.1.

This update has been rated as having moderate security impact by the Red
Hat Security Response Team.

PHP is an HTML-embedded scripting language commonly used with the Apache
HTTP Web server.

It was discovered that the PHP escapeshellcmd() function did not properly
escape multi-byte characters which are not valid in the locale used by the
script. This could allow an attacker to bypass quoting restrictions imposed
by escapeshellcmd() and execute arbitrary commands if the PHP script was
using certain locales. Scripts using the default UTF-8 locale are not
affected by this issue. (CVE-2008-2051)

The PHP functions htmlentities() and htmlspecialchars() did not properly
recognize partial multi-byte sequences. Certain sequences of bytes could be
passed through these functions without being correctly HTML-escaped.
Depending on the browser being used, an attacker could use this flaw to
conduct cross-site scripting attacks. (CVE-2007-5898)

A PHP script which used the transparent session ID configuration option, or
which used the output_add_rewrite_var() function, could leak session
identifiers to external web sites. If a page included an HTML form with an
ACTION attribute referencing a non-local URL, the user's session ID would
be included in the form data passed to that URL. (CVE-2007-5899)

It was discovered that PHP did not properly seed its pseudo-random number
generator used by functions such as rand() and mt_rand(), possibly allowing
an attacker to easily predict the generated pseudo-random values.
(CVE-2008-2107, CVE-2008-2108)

Integer overflow and memory requirements miscalculation issues were
discovered in the Perl-Compatible Regular Expression (PCRE) library used by
PHP to process regular expressions. These issues could cause a crash, or
possibly execute an arbitrary code with the privileges of the PHP script
that processes regular expressions from untrusted sources. Note: PHP
packages shipped with Red Hat Enterprise Linux 2.1 did not use the
system-level PCRE library. By default they used an embedded copy of the
library included with the PHP package. (CVE-2006-7228, CVE-2007-1660)

Users of PHP should upgrade to these updated packages, which contain
backported patches to correct these issues.


Solution

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

This update is available via Red Hat Network. Details on how to use
the Red Hat Network to apply this update are available at
http://kbase.redhat.com/faq/FAQ_58_10188

Updated packages

Red Hat Enterprise Linux AS (v. 2.1)

SRPMS:
php-4.1.2-2.20.src.rpm     2380659b7c8f0a3f7bbd2f8dbd1b3aa1
 
IA-32:
php-4.1.2-2.20.i386.rpm     97338d88bf6c2f20ea2af3903e5b7e24
php-devel-4.1.2-2.20.i386.rpm     1dd32379cbb5360708aa6e7df6688afc
php-imap-4.1.2-2.20.i386.rpm     f5f9d603cffa12e4316e3a49bd1f80f1
php-ldap-4.1.2-2.20.i386.rpm     f0d1c323fff7a505c6949ff519ac8be8
php-manual-4.1.2-2.20.i386.rpm     e03d39a26a64619e2c4f2c1c68aabb9e
php-mysql-4.1.2-2.20.i386.rpm     3d2b030a2006fcd79b90fa2e7bebc0c3
php-odbc-4.1.2-2.20.i386.rpm     7c1144760edc1d639bef72e86f94f389
php-pgsql-4.1.2-2.20.i386.rpm     62661ec41d507f88740ea4d0a40dd8a7
 
IA-64:
php-4.1.2-2.20.ia64.rpm     0e6164a4fa081236ae35c97b7c40417c
php-devel-4.1.2-2.20.ia64.rpm     defaedc177d8cb595a6cba8afcd9eceb
php-imap-4.1.2-2.20.ia64.rpm     0d394bbca53a906e6ff21f3f0013345c
php-ldap-4.1.2-2.20.ia64.rpm     7c08433ab4b5a51fd815fae75c13f0ec
php-manual-4.1.2-2.20.ia64.rpm     3d05fba6e8783d3a3b8fb3f3ef0df1bd
php-mysql-4.1.2-2.20.ia64.rpm     a7ec91ad83abdff9bc2a069a4453ff5d
php-odbc-4.1.2-2.20.ia64.rpm     c1db59f554c57d37c0a7bf8710658f0a
php-pgsql-4.1.2-2.20.ia64.rpm     6835749d7fa3a6936252ce09383ad270
 
Red Hat Enterprise Linux ES (v. 2.1)

SRPMS:
php-4.1.2-2.20.src.rpm     2380659b7c8f0a3f7bbd2f8dbd1b3aa1
 
IA-32:
php-4.1.2-2.20.i386.rpm     97338d88bf6c2f20ea2af3903e5b7e24
php-devel-4.1.2-2.20.i386.rpm     1dd32379cbb5360708aa6e7df6688afc
php-imap-4.1.2-2.20.i386.rpm     f5f9d603cffa12e4316e3a49bd1f80f1
php-ldap-4.1.2-2.20.i386.rpm     f0d1c323fff7a505c6949ff519ac8be8
php-manual-4.1.2-2.20.i386.rpm     e03d39a26a64619e2c4f2c1c68aabb9e
php-mysql-4.1.2-2.20.i386.rpm     3d2b030a2006fcd79b90fa2e7bebc0c3
php-odbc-4.1.2-2.20.i386.rpm     7c1144760edc1d639bef72e86f94f389
php-pgsql-4.1.2-2.20.i386.rpm     62661ec41d507f88740ea4d0a40dd8a7
 
Red Hat Enterprise Linux WS (v. 2.1)

SRPMS:
php-4.1.2-2.20.src.rpm     2380659b7c8f0a3f7bbd2f8dbd1b3aa1
 
IA-32:
php-4.1.2-2.20.i386.rpm     97338d88bf6c2f20ea2af3903e5b7e24
php-devel-4.1.2-2.20.i386.rpm     1dd32379cbb5360708aa6e7df6688afc
php-imap-4.1.2-2.20.i386.rpm     f5f9d603cffa12e4316e3a49bd1f80f1
php-ldap-4.1.2-2.20.i386.rpm     f0d1c323fff7a505c6949ff519ac8be8
php-manual-4.1.2-2.20.i386.rpm     e03d39a26a64619e2c4f2c1c68aabb9e
php-mysql-4.1.2-2.20.i386.rpm     3d2b030a2006fcd79b90fa2e7bebc0c3
php-odbc-4.1.2-2.20.i386.rpm     7c1144760edc1d639bef72e86f94f389
php-pgsql-4.1.2-2.20.i386.rpm     62661ec41d507f88740ea4d0a40dd8a7
 
Red Hat Linux Advanced Workstation 2.1 for the Itanium Processor

SRPMS:
php-4.1.2-2.20.src.rpm     2380659b7c8f0a3f7bbd2f8dbd1b3aa1
 
IA-64:
php-4.1.2-2.20.ia64.rpm     0e6164a4fa081236ae35c97b7c40417c
php-devel-4.1.2-2.20.ia64.rpm     defaedc177d8cb595a6cba8afcd9eceb
php-imap-4.1.2-2.20.ia64.rpm     0d394bbca53a906e6ff21f3f0013345c
php-ldap-4.1.2-2.20.ia64.rpm     7c08433ab4b5a51fd815fae75c13f0ec
php-manual-4.1.2-2.20.ia64.rpm     3d05fba6e8783d3a3b8fb3f3ef0df1bd
php-mysql-4.1.2-2.20.ia64.rpm     a7ec91ad83abdff9bc2a069a4453ff5d
php-odbc-4.1.2-2.20.ia64.rpm     c1db59f554c57d37c0a7bf8710658f0a
php-pgsql-4.1.2-2.20.ia64.rpm     6835749d7fa3a6936252ce09383ad270
 
(The unlinked packages above are only available from the Red Hat Network)

Bugs fixed (see bugzilla for more information)

315881 - CVE-2007-1660 pcre regular expression flaws
382411 - CVE-2007-5898 php htmlentities/htmlspecialchars multibyte sequences
382431 - CVE-2007-5899 php session ID leakage
383371 - CVE-2006-7228 pcre integer overflow
445006 - CVE-2008-2051 PHP multibyte shell escape flaw
445684 - CVE-2008-2107 PHP 32 bit weak random seed
445685 - CVE-2008-2108 PHP weak 64 bit random seed


References



These packages are GPG signed by Red Hat for security. Our key and details on how to verify the signature are available from:
https://www.redhat.com/security/team/key/#package

The Red Hat security contact is secalert@redhat.com. More contact details at http://www.redhat.com/security/team/contact/