[php-maint] research for recent PHP security vulnerabilities

Martin Pitt martin.pitt at ubuntu.com
Thu Sep 7 12:25:27 UTC 2006


Hi PHP maintainers,

I just finished the PHP security update for Ubuntu, to fix some of the
recent issues. I talked to Sean yesterday and promised to share my
patch research, so here it is.

I ported the patches to php 5.1.4 (dapper), 5.0.5 (breezy), and 4.3.10
(hoary), so feel free to grab the patches from the updated source
packages at security.ubuntu.com.

HTH,

Martin

=================================================
CVE-2006-4020
sscanf buffer overflow
http://bugs.php.net/bug.php?id=38322
5.1: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/scanf.c?r1=1.31.2.2&r2=1.31.2.3
4.4: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/scanf.c?r1=1.16.4.9.2.1&r2=1.16.4.9.2.2

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-4023
ip2long() information disclosure
no patch yet

=================================================
CVE-2006-4433
does not limit the character set of PHPSESSID
a bit diffuse and questionable, bug in Zend core, needs further investigations

=================================================
CVE-2006-4481
safe_mode/open_basedir bypass with file_exists() and imap_reopen()
4.4 [imap_reopen()]: http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.142.2.44.2.5&r2=1.142.2.44.2.6
5.1 [imap_reopen()]: http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.8&r2=1.208.2.9
5.1 [file_exists()]: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filestat.c?r1=1.136.2.8&r2=1.136.2.9

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-4482
str_repeat() and wordwrap() buffer overflow on 64 bit systems
5.1: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.10&r2=1.445.2.14.2.11

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-4483
safe_mode/open_basedir bypass with curl
(already fixed as CVE-2006-2563, the actual CVE-2006-2563 fix might be
a different one)

=================================================
CVE-2006-4484
GIF parser overflow
4.4: http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.2.2.2.6.2&r2=1.2.2.2.6.3
5.1: http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_gif_in.c?r1=1.5.4.4&r2=1.5.4.5

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-4485
stripos() overflow
4.4: N/A (function does not exist)
5.1: mentioned in release announcement, but not in detailled changelog, no CVS fix

=================================================
CVE-2006-4486
unspecified memory_limit bug on 64 bit systems
further information required

-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20060907/cff39918/attachment.pgp


More information about the pkg-php-maint mailing list