Help - Search - Members - Calendar
Full Version: Emergency PHP upgrades 20-21 December
Hostony Board > General > News and Announcements
Serge
In order to protect our servers and close multiple security holes that were recently discovered in php 4/5 we'll be performing emergency upgrades of php on all our servers through 20-21 December.

Estimated downtime: 1-5 minutes required for apache+php to be restarted.

Thank you all of you for your patience and understanding.

QUOTE

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hardened-PHP Project
www.hardened-php.net

-= Security Advisory =-



Advisory: Multiple vulnerabilities within PHP 4/5
Release Date: 2004/12/15
Last Modified: 2004/12/15
Author: Stefan Esser [sesser@php.net]Application: PHP4 <= 4.3.9
PHP5 <= 5.0.2
Severity: Several vulnerabilities within PHP allow
local and remote execution of arbitrary code
Risk: Critical
Vendor Status: Vendor has released bugfixed versions.
References: http://www.hardened-php.net/advisories/012004.txt


Overview:

PHP is a widely-used general-purpose scripting language that is
especially suited for Web development and can be embedded into HTML.

During the development of Hardened-PHP which adds security hardening
features to the PHP codebase, several vulnerabilities within PHP
were discovered that reach from bufferoverflows, over information
leak vulnerabilities and path truncation vulnerabilities to
safe_mode restriction bypass vulnerabilities.


Details:

[01 - pack() - integer overflow leading to heap bufferoverflow ]

Insufficient validation of the parameters passed to pack() can
lead to a heap overflow which can be used to execute arbitrary
code from within a PHP script. This enables an attacker to
bypass safe_mode restrictions and execute arbitrary code with
the permissions of the webserver. Due to the nature of this
function it is unlikely that a script accidently exposes it to
remote attackers.

[02 - unpack() - integer overflow leading to heap info leak ]

Insufficient validation of the parameters passed to unpack() can
lead to a heap information leak which can be used to retrieve
secret data from the apache process. Additionally a skilled
local attacker could use this vulnerability in combination with
01 to bypass heap canary protection systems. Similiar to 01 this
function is usually not used on user supplied data within
webapplications.

[03 - safe_mode_exec_dir bypass in multithreaded PHP ]

When safe_mode is activated within PHP, it is only allowed to
execute commands within the configured safe_mode_exec_dir.
Unfourtunately PHP does prepend a "cd [currentdir] ;" to any
executed command when a PHP is running on a multithreaded unix
webserver (f.e. some installations of Apache2). Because the name
of the current directory is prepended directly a local attacker
may bypass safe_mode_exec_dir restrictions by injecting shell-
commands into the current directory name.

[04 - safe_mode bypass through path truncation ]

The safe_mode checks silently truncated the file path at MAXPATHLEN
bytes before passing it to realpath(). In combination with certain
malfunctional implementations of realpath() f.e. within glibc this
allows crafting a filepath that pass the safe_mode check although
it points to a file that should fail the safe_mode check.

[05 - path truncation in realpath() ]

PHP uses realpath() within several places to get the real path
of files. Unfourtunately some implementations of realpath() silently
truncate overlong filenames (f.e. OpenBSD, and older NetBSD/FreeBSD)
This can lead to arbitrary file include vulnerabilities if something
like "include "modules/$userinput/config.inc.php"; is used on such
systems.

[06 - unserialize() - wrong handling of negative references ]

The variable unserializer could be fooled with negative references
to add false zvalues to hashtables. When those hashtables get
destroyed this can lead to efree()s of arbitrary memory addresses
which can result in arbitrary code execution. (Unless Hardened-PHP's
memory manager canaries are activated)

[07 - unserialize() - wrong handling of references to freed data ]

Additionally to bug 06 the previous version of the variable
unserializer allowed setting references to already freed entries in
the variable hash. A skilled attacker can exploit this to create
an universal string that will pass execution to an arbitrary
memory address when it is passed to unserialize(). For AMD64 systems
it was even possible to developed a string that directly passes
execution to shellcode contained in the string itself.

It is necessary to understand that these strings can exploit a
bunch of popular PHP applications remotely because they pass f.e.
cookie content to unserialize().

Examples of vulnerable scripts:

- phpBB2
- Invision Board
- vBulletin
- Woltlab Burning Board 2.x
- Serendipity Weblog
- phpAds(New)
- ...


Proof of Concept:

The Hardened-PHP project is not going to release exploits for any
of these vulnerabilities to the public.


CVE Information:

The Common Vulnerabilities and Exposures project (cve.mitre.org) has
assigned the name CAN-2004-1018 to issues 01, 02, the name
CAN-2004-1019 to issues 06, 07, the name CAN-2004-1063 to issue 03
and the name CAN-2004-1064 to issues 04, 05.


Recommendation:

It is strongly recommended to upgrade to the new PHP-Releases as
soon as possible, because a lot of PHP applications expose the
easy to exploit unserialize() vulnerability to remote attackers.
Additionally we always recommend to run PHP with the Hardened-PHP
patch applied.


GPG-Key:

http://www.hardened-php.net/hardened-php-signature-key.asc

pub 1024D/0A864AA1 2004-04-17 Hardened-PHP Signature Key
Key fingerprint = 066F A6D0 E57E 9936 9082 7E52 4439 14CC 0A86 4AA1


Copyright 2004 Stefan Esser. All rights reserved.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFBwIzIRDkUzAqGSqERArD/AKCqerfjCYJnZ2vy7tRYth3VqWmqhwCbB+LL
s12EomCQ0IstWmz3F/QhM8E=
=21xF
-----END PGP SIGNATURE-----
SlayableMedia
Do you plan on updating Zend Optimizer as well?

http://www.zend.com/store/products/zend-optimizer.php

Right now...PHP 4.3.10 and the old version of Zend Optimizer aren't compatible. That is what is causing my forums not to work.

(My domain is slayablemedia.com)
Lehrer
SlayableMedia, we have completed Zend Optimizer upgrade, as well as successfully finished PHP recompile
SlayableMedia
Well, my website is still down even after you've upgraded. I have vBulletin forums...I asked their for support and they say that PHP and Zend is the problem...*shrug*
Niakie
MySQL has been up and down all day on server 16. Its been causeing me a lot of grief, but I presumed that it had to do with them working on upgrading PHP. Any info on this?
Alec
Niakie. It must be working now. Please check it and let us know some way about the results
Niakie
Yup its working now, was just up and down this afternoon... I'll keep you informed over the next couple of days as I'm doing some work on one of my sites and can't do anything when its down lol
bpgisme
You guys are working on this now or are you finished? I was just wondering because I'm getting that "Connect Error. Could not connect to MySQL database." page....

smile.gif

-Bonnie
bpgisme.com


(It's working now! smile.gif )
Alexandre
It must be working now. wink.gif
bpgisme
yep. smile.gif
TheDanMan
When I run a phpinfo() I still see that the server is running 4.3.4, have the upgrades not happened?
RAGEnCHAOS
i don't think Windows 2k3 servers are in the loop for servers 20 and 21 both are linux as far as i know so i am not sure if yours is going to get it
TheDanMan
Any idea then when us lowly windows guys will be getting patched up? I've got a customer griping about it. :-(
JasonJones
QUOTE(RAGEnCHAOS @ Dec 22 2004, 03:36 PM)
i don't think Windows 2k3 servers are in the loop for servers 20 and 21 both are linux as far as i know so i am not sure if yours is going to get it

the 20-21 was for the dates of the upgrades.
TheDanMan
Thats what I had thought. So why am I still getting 4.3.4 when I do the phpinfo() call?
Dark Hedgehog
Is that why my site displayed the billing page in place of my site? unsure.gif
Lehrer
That's because you have billing problems. And your site has been suspended
Linear Helix
Was this upgrade in response to the NeverEverNoSanity worm? And if so, does it prevent the worm from affecting our servers?
Lehrer
QUOTE(Linear Helix @ Dec 24 2004, 08:35 PM)
Was this upgrade in response to the NeverEverNoSanity worm? And if so, does it prevent the worm from affecting our servers?
*


The upgrade was done to close insecure holes in the old server's software.
ser_pros
Please check your phpinfo now.
kanasta
sites dead
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/tmp/mysql.sock
JasonJones
What does that have to do with this thread?
Stanly
Topic is closed 'cause the initial problem is solved smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here