Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Nikita Popov's Blog:
Supercolliding a PHP array
Dec 29, 2011 @ 18:15:30

In a new post to his blog Nikita Popov talks about a little trick with inserting values into arrays that can make it take a lot longer than it should (because of how PHP stores its array values in hashtables).

PHP internally uses hashtables to store arrays. The above creates a hashtable with 100% collisions (i.e. all keys will have the same hash). [...] Because every hash function has collisions this C array doesn't actually store the value we want, but a linked list of possible values. [...] Normally there will be only a small number of collisions, so in most cases the linked list will only have one value. But the [included script] creates a hash where all elements collide.

He explains why it works, noting that it's relatively simple to do in PHP because of how it applies a table mask. The slowness comes in when PHP is forced to go through the entire list when it tries to insert. Because of this issue, there's the potential for a Denial of Service attack that could potentially take a server down. There's a fix already in place for the problem, though, so keep an eye out for the next release (that will include a max_input_vars setting to prevent it).

tagged: collision array hashtable mask denialofservice overload

Link:

Secunia:
rPath Update for gd and Multiple php Packages
Sep 06, 2007 @ 14:43:00

As mentioned in this Secunia advisory today, rPath has release updates to several packages today including a few PHP ones and GD library updates.

rPath has issued an update for gd and multiple php packages. This fixes some vulnerabilities, where some have an unknown impact and others can potentially be exploited to cause a DoS (Denial of Service).

The update is marked as "moderately critical" so it's recommended that users update their installations as soon as possible. You can find out more information and get the links to download the packages from the original advisory post.

tagged: rpath gd package multiple denialofservice download rpath gd package multiple denialofservice download

Link:

Secunia:
rPath Update for gd and Multiple php Packages
Sep 06, 2007 @ 14:43:00

As mentioned in this Secunia advisory today, rPath has release updates to several packages today including a few PHP ones and GD library updates.

rPath has issued an update for gd and multiple php packages. This fixes some vulnerabilities, where some have an unknown impact and others can potentially be exploited to cause a DoS (Denial of Service).

The update is marked as "moderately critical" so it's recommended that users update their installations as soon as possible. You can find out more information and get the links to download the packages from the original advisory post.

tagged: rpath gd package multiple denialofservice download rpath gd package multiple denialofservice download

Link:

Secunia.com:
Debian Update for PHP4 & PHP5
Jul 09, 2007 @ 15:26:00

On Secunia.com, two new updates for the Debian linux distribution have been posted - on for PHP4 and the other for PHP5:

Debian has issued an update for php4/5. This fixes some vulnerabilities, which can be exploited by malicious people to conduct cross-site scripting attacks, cause a DoS (Denial of Service), and potentially compromise a vulnerable system.

You can get more information and links to the downloads here:

tagged: debian update package php4 php5 denialofservice crosssitescripting debian update package php4 php5 denialofservice crosssitescripting

Link:

Secunia.com:
Debian Update for PHP4 & PHP5
Jul 09, 2007 @ 15:26:00

On Secunia.com, two new updates for the Debian linux distribution have been posted - on for PHP4 and the other for PHP5:

Debian has issued an update for php4/5. This fixes some vulnerabilities, which can be exploited by malicious people to conduct cross-site scripting attacks, cause a DoS (Denial of Service), and potentially compromise a vulnerable system.

You can get more information and links to the downloads here:

tagged: debian update package php4 php5 denialofservice crosssitescripting debian update package php4 php5 denialofservice crosssitescripting

Link:

Secunia.com:
Slackware update for PHP5
Jun 04, 2007 @ 22:04:00

The Slackware group has released an update to their PHP5 packages according to this new release on the Secunia site:

Slackware has issued an update for php5. This fixes some vulnerabilities, where one has an unknown impact and others can be exploited by malicious people to bypass certain security restrictions and cause a DoS (Denial of Service).

You can grab the updated packages via the original advisory and bring your installation up to date with the latest security fixes.

tagged: slackware php5 update package security denialofservice slackware php5 update package security denialofservice

Link:

Secunia.com:
Slackware update for PHP5
Jun 04, 2007 @ 22:04:00

The Slackware group has released an update to their PHP5 packages according to this new release on the Secunia site:

Slackware has issued an update for php5. This fixes some vulnerabilities, where one has an unknown impact and others can be exploited by malicious people to bypass certain security restrictions and cause a DoS (Denial of Service).

You can grab the updated packages via the original advisory and bring your installation up to date with the latest security fixes.

tagged: slackware php5 update package security denialofservice slackware php5 update package security denialofservice

Link:

Secunia.com:
PHP "gdPngReadData()" Truncated PNG Data Denial of Service
May 22, 2007 @ 16:09:00

Secunia has posted this new advisory today about an issue with the GD graphics library functionality in PHP that could be used to cause a Denial of Service via a truncated PNG image.

The vulnerability is caused due to the incorrect use of libpng within the function "gdPngReadData()" in ext/gd/libgd/gd_png.c of the GD extension when processing truncated data. This can be exploited to cause an infinite loop by e.g. tricking an application to process a specially crafted file. (reported by Xavier Roche)

This issue has been confirmed in PHP versions 4.4.7 and 5.2.2 but may affect others. The issue has already been corrected, however, and can be fetched from the PHP CVS system to protect your system.

tagged: gd image png truncate denialofservice secunia gdpngreaddata gd image png truncate denialofservice secunia gdpngreaddata

Link:

Secunia.com:
PHP "gdPngReadData()" Truncated PNG Data Denial of Service
May 22, 2007 @ 16:09:00

Secunia has posted this new advisory today about an issue with the GD graphics library functionality in PHP that could be used to cause a Denial of Service via a truncated PNG image.

The vulnerability is caused due to the incorrect use of libpng within the function "gdPngReadData()" in ext/gd/libgd/gd_png.c of the GD extension when processing truncated data. This can be exploited to cause an infinite loop by e.g. tricking an application to process a specially crafted file. (reported by Xavier Roche)

This issue has been confirmed in PHP versions 4.4.7 and 5.2.2 but may affect others. The issue has already been corrected, however, and can be fetched from the PHP CVS system to protect your system.

tagged: gd image png truncate denialofservice secunia gdpngreaddata gd image png truncate denialofservice secunia gdpngreaddata

Link:

Secunia.com:
Ubuntu update for PHP
Apr 27, 2007 @ 18:26:00

Secunia has issued an advisory today for Ubuntu users - an upgrade has been released to correct a few vulnerabilities.

Ubuntu has issued an update for php. This fixes some vulnerabilities, which can be exploited by malicious users to disclose potentially sensitive information, bypass certain security restrictions, gain escalated privileges, cause a DoS (Denial of Service), compromise a vulnerable system, and by malicious people to disclose potentially sensitive information, bypass certain security restrictions, cause a DoS (Denial of Service), and potentially compromise a vulnerable system.

The Secunia post has links to all of the packages you'll need (for each kind of architecture) to get things up to date and corrected. This issue has been marked as "Moderately Critical".

tagged: ubuntu linux update install vulnerability denialofservice ubuntu linux update install vulnerability denialofservice

Link:


Trending Topics: