dashiwa / php52-backports

Automatically exported from code.google.com/p/php52-backports
Other
0 stars 0 forks source link

Infinite recursion #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
<?php
function loop()
{
    loop();
}
loop();

There are CVEs for XML bugs, but why there is no solution for this.
Bad gateway every time. php53 and php54 don't segfault here.

Original issue reported on code.google.com by gglate...@gmail.com on 20 Jul 2013 at 9:53

GoogleCodeExporter commented 8 years ago
Hello,

Possibly the issue is located within the zend engine and that is not easy to 
fix without breaking compatibility with closed source modules that can't be 
recompiled to support a custom zend engine.

What I suggest you to protect your server from this issue is to install the 
Suhosin extension and with the correct settings prevent this from happening.

suhosin.executor.max_depth = 10000

This is currently what I do in my server.

Regards,
NewEraCracker

Original comment by NewEraCr...@gmail.com on 7 Aug 2013 at 1:53

GoogleCodeExporter commented 8 years ago
Also, for the record, this issue existed since PHP 4 and was only fixed in PHP 
5.3 but I don't know which code they've changed to fix it.

http://www.php-security.org/MOPB/MOPB-02-2007.html

Original comment by NewEraCr...@gmail.com on 8 Aug 2013 at 7:44

GoogleCodeExporter commented 8 years ago
They didn't fixed it, but they added parametr which limit recursion level 
instead.

Original comment by romans.h...@gmail.com on 16 Sep 2013 at 1:14