Security Advisory Moderate: php security update

Advisory: RHSA-2008:0582-2
Type: Security Advisory
Severity: Moderate
Issued on: 2008-07-22
Last updated on: 2008-07-22
Affected Products: Red Hat Application Stack v1 for Enterprise Linux AS (v.4)
Red Hat Application Stack v1 for Enterprise Linux ES (v.4)
OVAL: N/A
CVEs (cve.mitre.org): CVE-2007-4782
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 Application Stack v1.

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)

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 fnmatch() function did not restrict the length
of the string argument. An attacker could use this flaw to crash the PHP
interpreter where a script used fnmatch() on untrusted input data.
(CVE-2007-4782)

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)

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 Application Stack v1 for Enterprise Linux AS (v.4)

SRPMS:
php-5.1.6-3.el4s1.10.src.rpm     9bee0b20f14cd28325b34895ff64e64b
 
IA-32:
php-5.1.6-3.el4s1.10.i386.rpm     93918a35feddde8eef0fa7a9e4c14888
php-bcmath-5.1.6-3.el4s1.10.i386.rpm     f17f31046a67c2723d578b7ad83654a2
php-cli-5.1.6-3.el4s1.10.i386.rpm     d8350821cb6edf245e9edfffab40e94e
php-common-5.1.6-3.el4s1.10.i386.rpm     555f66fbb5a6ed7d98d98f3028d45556
php-dba-5.1.6-3.el4s1.10.i386.rpm     08c4a393c400f66e394b698a684fe05f
php-devel-5.1.6-3.el4s1.10.i386.rpm     9f91e06579d4539fa5ebd00b3e5cee65
php-gd-5.1.6-3.el4s1.10.i386.rpm     dbec1ecd4596833da140a2584ff2bc29
php-imap-5.1.6-3.el4s1.10.i386.rpm     b35ac1fb91903831d2ed2bd238fca966
php-ldap-5.1.6-3.el4s1.10.i386.rpm     2adba3bdd41637729eb54b0cf8f6fa86
php-mbstring-5.1.6-3.el4s1.10.i386.rpm     21a377ce892af8a5eb3e2324fc016cf0
php-mysql-5.1.6-3.el4s1.10.i386.rpm     b4086638de93552235bade11a7fe18d2
php-ncurses-5.1.6-3.el4s1.10.i386.rpm     4ee1e255532a188db2092d49392bbcfe
php-odbc-5.1.6-3.el4s1.10.i386.rpm     03d61b02977578f27e8d6ec5c5efd0fc
php-pdo-5.1.6-3.el4s1.10.i386.rpm     551a832fa6919c3eccccf9e7d4cdc669
php-pgsql-5.1.6-3.el4s1.10.i386.rpm     d8770ecc8697d05c2959d63e5b360df2
php-snmp-5.1.6-3.el4s1.10.i386.rpm     814fa7300ffb02aa47246326678d4e52
php-soap-5.1.6-3.el4s1.10.i386.rpm     ffbd230f19bc3f4da145ec961c86034d
php-xml-5.1.6-3.el4s1.10.i386.rpm     8318e67e85576b2e97781f9f56bc1c93
php-xmlrpc-5.1.6-3.el4s1.10.i386.rpm     e3d540fd3c5c542820fd20549106eb1f
 
x86_64:
php-5.1.6-3.el4s1.10.x86_64.rpm     003ef611e60c4d618d2da82550a9ae4f
php-bcmath-5.1.6-3.el4s1.10.x86_64.rpm     7072ba33e385a1cf773ad0552b653d87
php-cli-5.1.6-3.el4s1.10.x86_64.rpm     e01a8ed57abdbae88094729e8f3cc5e2
php-common-5.1.6-3.el4s1.10.x86_64.rpm     92e894a91666d0470859d5484e0b9997
php-dba-5.1.6-3.el4s1.10.x86_64.rpm     54aa87d0d59690a0ecb707a58308fe25
php-devel-5.1.6-3.el4s1.10.x86_64.rpm     7020940f9f2fdf0165268e2d85cff5a7
php-gd-5.1.6-3.el4s1.10.x86_64.rpm     4f3cbe32f1e4fd54c82b7cefac0ff548
php-imap-5.1.6-3.el4s1.10.x86_64.rpm     d0d631b45ed3e7266fca5d35cdc6fa35
php-ldap-5.1.6-3.el4s1.10.x86_64.rpm     1c6e1607aa190e2fc1097013b37ea6e5
php-mbstring-5.1.6-3.el4s1.10.x86_64.rpm     4fc8b8edcf866c5c0d38d57af300da67
php-mysql-5.1.6-3.el4s1.10.x86_64.rpm     67ce9363f9c0a24788929ca117e3d3e4
php-ncurses-5.1.6-3.el4s1.10.x86_64.rpm     c661d7d8056d45c98144892b3570346c
php-odbc-5.1.6-3.el4s1.10.x86_64.rpm     fa31efa3e6f899f0fb4170ac8af14b77
php-pdo-5.1.6-3.el4s1.10.x86_64.rpm     0c280149baaea55bb71ed0dae4459b5b
php-pgsql-5.1.6-3.el4s1.10.x86_64.rpm     7559e2399ac2e80b176b7e81270278bc
php-snmp-5.1.6-3.el4s1.10.x86_64.rpm     52dcdd593e3d3740d9f46854da308e07
php-soap-5.1.6-3.el4s1.10.x86_64.rpm     8363cb2391e4eb04fff938a961d5dede
php-xml-5.1.6-3.el4s1.10.x86_64.rpm     efd4b746bb61331b865936777df483af
php-xmlrpc-5.1.6-3.el4s1.10.x86_64.rpm     752f9e00cc4224153b8a8d5af6304665
 
Red Hat Application Stack v1 for Enterprise Linux ES (v.4)

SRPMS:
php-5.1.6-3.el4s1.10.src.rpm     9bee0b20f14cd28325b34895ff64e64b
 
IA-32:
php-5.1.6-3.el4s1.10.i386.rpm     93918a35feddde8eef0fa7a9e4c14888
php-bcmath-5.1.6-3.el4s1.10.i386.rpm     f17f31046a67c2723d578b7ad83654a2
php-cli-5.1.6-3.el4s1.10.i386.rpm     d8350821cb6edf245e9edfffab40e94e
php-common-5.1.6-3.el4s1.10.i386.rpm     555f66fbb5a6ed7d98d98f3028d45556
php-dba-5.1.6-3.el4s1.10.i386.rpm     08c4a393c400f66e394b698a684fe05f
php-devel-5.1.6-3.el4s1.10.i386.rpm     9f91e06579d4539fa5ebd00b3e5cee65
php-gd-5.1.6-3.el4s1.10.i386.rpm     dbec1ecd4596833da140a2584ff2bc29
php-imap-5.1.6-3.el4s1.10.i386.rpm     b35ac1fb91903831d2ed2bd238fca966
php-ldap-5.1.6-3.el4s1.10.i386.rpm     2adba3bdd41637729eb54b0cf8f6fa86
php-mbstring-5.1.6-3.el4s1.10.i386.rpm     21a377ce892af8a5eb3e2324fc016cf0
php-mysql-5.1.6-3.el4s1.10.i386.rpm     b4086638de93552235bade11a7fe18d2
php-ncurses-5.1.6-3.el4s1.10.i386.rpm     4ee1e255532a188db2092d49392bbcfe
php-odbc-5.1.6-3.el4s1.10.i386.rpm     03d61b02977578f27e8d6ec5c5efd0fc
php-pdo-5.1.6-3.el4s1.10.i386.rpm     551a832fa6919c3eccccf9e7d4cdc669
php-pgsql-5.1.6-3.el4s1.10.i386.rpm     d8770ecc8697d05c2959d63e5b360df2
php-snmp-5.1.6-3.el4s1.10.i386.rpm     814fa7300ffb02aa47246326678d4e52
php-soap-5.1.6-3.el4s1.10.i386.rpm     ffbd230f19bc3f4da145ec961c86034d
php-xml-5.1.6-3.el4s1.10.i386.rpm     8318e67e85576b2e97781f9f56bc1c93
php-xmlrpc-5.1.6-3.el4s1.10.i386.rpm     e3d540fd3c5c542820fd20549106eb1f
 
x86_64:
php-5.1.6-3.el4s1.10.x86_64.rpm     003ef611e60c4d618d2da82550a9ae4f
php-bcmath-5.1.6-3.el4s1.10.x86_64.rpm     7072ba33e385a1cf773ad0552b653d87
php-cli-5.1.6-3.el4s1.10.x86_64.rpm     e01a8ed57abdbae88094729e8f3cc5e2
php-common-5.1.6-3.el4s1.10.x86_64.rpm     92e894a91666d0470859d5484e0b9997
php-dba-5.1.6-3.el4s1.10.x86_64.rpm     54aa87d0d59690a0ecb707a58308fe25
php-devel-5.1.6-3.el4s1.10.x86_64.rpm     7020940f9f2fdf0165268e2d85cff5a7
php-gd-5.1.6-3.el4s1.10.x86_64.rpm     4f3cbe32f1e4fd54c82b7cefac0ff548
php-imap-5.1.6-3.el4s1.10.x86_64.rpm     d0d631b45ed3e7266fca5d35cdc6fa35
php-ldap-5.1.6-3.el4s1.10.x86_64.rpm     1c6e1607aa190e2fc1097013b37ea6e5
php-mbstring-5.1.6-3.el4s1.10.x86_64.rpm     4fc8b8edcf866c5c0d38d57af300da67
php-mysql-5.1.6-3.el4s1.10.x86_64.rpm     67ce9363f9c0a24788929ca117e3d3e4
php-ncurses-5.1.6-3.el4s1.10.x86_64.rpm     c661d7d8056d45c98144892b3570346c
php-odbc-5.1.6-3.el4s1.10.x86_64.rpm     fa31efa3e6f899f0fb4170ac8af14b77
php-pdo-5.1.6-3.el4s1.10.x86_64.rpm     0c280149baaea55bb71ed0dae4459b5b
php-pgsql-5.1.6-3.el4s1.10.x86_64.rpm     7559e2399ac2e80b176b7e81270278bc
php-snmp-5.1.6-3.el4s1.10.x86_64.rpm     52dcdd593e3d3740d9f46854da308e07
php-soap-5.1.6-3.el4s1.10.x86_64.rpm     8363cb2391e4eb04fff938a961d5dede
php-xml-5.1.6-3.el4s1.10.x86_64.rpm     efd4b746bb61331b865936777df483af
php-xmlrpc-5.1.6-3.el4s1.10.x86_64.rpm     752f9e00cc4224153b8a8d5af6304665
 
(The unlinked packages above are only available from the Red Hat Network)

Bugs fixed (see bugzilla for more information)

285881 - CVE-2007-4782 php crash in glob() and fnmatch() functions
382411 - CVE-2007-5898 php htmlentities/htmlspecialchars multibyte sequences
382431 - CVE-2007-5899 php session ID leakage
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/