USN-342-1: PHP vulnerabilities

07 September 2006

PHP vulnerabilities

Releases

Details

The sscanf() function did not properly check array boundaries. In
applications which use sscanf() with argument swapping, a remote attacker
could potentially exploit this to crash the affected web application
or even execute arbitrary code with the application's privileges.
(CVE-2006-4020)

The file_exists() and imap_reopen() functions did not perform
proper open_basedir and safe_mode checks which could allow local
scripts to bypass intended restrictions. (CVE-2006-4481)

On 64 bit systems the str_repeat() and wordwrap() functions did not
properly check buffer boundaries. Depending on the application, this
could potentially be exploited to execute arbitrary code with the
applications' privileges. This only affects the amd64 and sparc
platforms. (CVE-2006-4482)

A buffer overflow was discovered in the LWZReadByte_() function of the
GIF image file parser. By tricking a PHP application into processing a
specially crafted GIF image, a remote attacker could exploit this to
execute arbitrary code with the application's privileges.
(CVE-2006-4484)

Update instructions

The problem can be corrected by updating your system to the following package versions:

Ubuntu 6.06
  • php5-cli - 5.1.2-1ubuntu3.2
  • php5-cgi - 5.1.2-1ubuntu3.2
  • libapache2-mod-php5 - 5.1.2-1ubuntu3.2
  • php5-curl - 5.1.2-1ubuntu3.2
Ubuntu 5.10
  • php5-cli - 5.0.5-2ubuntu1.4
  • php5-cgi - 5.0.5-2ubuntu1.4
  • libapache2-mod-php5 - 5.0.5-2ubuntu1.4
  • php5-curl - 5.0.5-2ubuntu1.4
Ubuntu 5.04
  • libapache2-mod-php4 - 4:4.3.10-10ubuntu4.7
  • php4-cgi - 4:4.3.10-10ubuntu4.7
  • php4-cli - 4:4.3.10-10ubuntu4.7

In general, a standard system upgrade is sufficient to effect the
necessary changes.