Title: PHP 'rfc822_write_address()' Function Buffer Overflow Vulnerability
Severity: CRITICAL
Description:
PHP is a general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
PHP is prone to a buffer-overflow vulnerability because it fails to perform boundary checks before copying user-supplied data to insufficiently sized memory buffers.
The vulnerability occurs in 'rfc822_write_address()' invoked by the 'php_imap.c' source file. Specifically, the c-client legacy RFC 822 header generation routine copies headers into a buffer without checking the length of the header. If the header is larger than 16383 bytes, a buffer overflow can occur.
An attacker can exploit this issue to run arbitrary machine code in the context of the affected webserver. Failed exploit attempts will likely crash the webserver, denying service to legitimate users.
PHP 5.2.6 and prior versions are vulnerable.
Affected Products:
- Apple Mac OS X 10.5
- Apple Mac OS X 10.5.1
- Apple Mac OS X 10.5.2
- Apple Mac OS X 10.5.3
- Apple Mac OS X 10.5.4
- Apple Mac OS X 10.5.5
- Apple Mac OS X 10.5.6
- Apple Mac OS X Server 10.5
- Apple Mac OS X Server 10.5.1
- Apple Mac OS X Server 10.5.2
- Apple Mac OS X Server 10.5.3
- Apple Mac OS X Server 10.5.4
- Apple Mac OS X Server 10.5.5
- Apple Mac OS X Server 10.5.6
- Debian Linux 4.0
- Debian Linux 4.0 alpha
- Debian Linux 4.0 amd64
- Debian Linux 4.0 arm
- Debian Linux 4.0 hppa
- Debian Linux 4.0 ia-32
- Debian Linux 4.0 ia-64
- Debian Linux 4.0 m68k
- Debian Linux 4.0 mips
- Debian Linux 4.0 mipsel
- Debian Linux 4.0 powerpc
- Debian Linux 4.0 s/390
- Debian Linux 4.0 sparc
- Gentoo Linux
- HP HP-UX B.11.11
- HP HP-UX B.11.23
- HP HP-UX B.11.31
- MandrakeSoft Linux Mandrake 2007.1
- MandrakeSoft Linux Mandrake 2007.1 x86_64
- MandrakeSoft Linux Mandrake 2008.0
- MandrakeSoft Linux Mandrake 2008.0 x86_64
- MandrakeSoft Linux Mandrake 2008.1
- MandrakeSoft Linux Mandrake 2008.1 x86_64
- PHP PHP 5.0.0 candidate 1
- PHP PHP 5.0.0 candidate 2
- PHP PHP 5.0.0 candidate 3
- PHP PHP 5.0.1
- PHP PHP 5.0.2
- PHP PHP 5.0.3
- PHP PHP 5.0.4
- PHP PHP 5.0.5
- PHP PHP 5.1.0
- PHP PHP 5.1.1
- PHP PHP 5.1.2
- PHP PHP 5.1.3
- PHP PHP 5.1.3-RC1
- PHP PHP 5.1.4
- PHP PHP 5.1.5
- PHP PHP 5.1.6
- PHP PHP 5.2
- PHP PHP 5.2.1
- PHP PHP 5.2.2
- PHP PHP 5.2.3
- PHP PHP 5.2.4
- PHP PHP 5.2.5
- PHP PHP 5.2.6
- Pardus Linux 2007
- Pardus Linux 2008
- RedHat Fedora 10
- RedHat Fedora 9
- S.u.S.E. openSUSE 10.2
- S.u.S.E. openSUSE 10.3
- S.u.S.E. openSUSE 11.0
- Slackware Linux -current
- Slackware Linux 12.0
- Slackware Linux 12.1
- Trustix Secure Linux 2.2.0
- Turbolinux Appliance Server 2.0
- Turbolinux Appliance Server 3.0
- Turbolinux Appliance Server 3.0 x64
- Turbolinux Appliance Server Hosting Edition 1.0.0
- Turbolinux Appliance Server Workgroup Edition 1.0.0
- Turbolinux Turbolinux Server 10.0.0
- Turbolinux Turbolinux Server 10.0.0 x64
- Turbolinux Turbolinux Server 11
- Turbolinux Turbolinux Server 11 x64
- Ubuntu Ubuntu Linux 6.06 LTS amd64
- Ubuntu Ubuntu Linux 6.06 LTS i386
- Ubuntu Ubuntu Linux 6.06 LTS powerpc
- Ubuntu Ubuntu Linux 6.06 LTS sparc
- Ubuntu Ubuntu Linux 6.10 amd64
- Ubuntu Ubuntu Linux 6.10 i386
- Ubuntu Ubuntu Linux 6.10 powerpc
- Ubuntu Ubuntu Linux 6.10 sparc
- Ubuntu Ubuntu Linux 7.04 amd64
- Ubuntu Ubuntu Linux 7.04 i386
- Ubuntu Ubuntu Linux 7.04 powerpc
- Ubuntu Ubuntu Linux 7.04 sparc
- Ubuntu Ubuntu Linux 7.10 amd64
- Ubuntu Ubuntu Linux 7.10 i386
- Ubuntu Ubuntu Linux 7.10 lpia
- Ubuntu Ubuntu Linux 7.10 powerpc
- Ubuntu Ubuntu Linux 7.10 sparc
- Ubuntu Ubuntu Linux 8.04 LTS amd64
- Ubuntu Ubuntu Linux 8.04 LTS i386
- Ubuntu Ubuntu Linux 8.04 LTS lpia
- Ubuntu Ubuntu Linux 8.04 LTS powerpc
- Ubuntu Ubuntu Linux 8.04 LTS sparc
- rPath Appliance Platform Linux Service 1
- rPath Appliance Platform Linux Service 2
- rPath rPath Linux 1
- rPath rPath Linux 2
References:
- Christian Hoffmann: CVE request: php 5.2.6 ext/imap buffer overflows
- Gentoo: Bugzilla Bug 221969
- Maylein at ub dot uni-heidelberg dot de: IMAP toolkit crash: rfc822.c legacy routine buffer, overflow
- PHP: PHP 5.2.8 Changelog
- PHP Group: PHP Homepage
- dan at westernitgroup dot com: rfc822.c legacy routine buffer overflow
Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.