Re: recover from a segfault

From: Date: Fri, 24 Feb 2006 16:15:26 +0000
Subject: Re: recover from a segfault
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-22005@lists.php.net to get a copy of this message
Hi Jared,

It's true, array_walk_recursive() used the php_array_walk() and it can cause some serious problem within the stack.
The way to fix this bug is to prevent the "out-of stack limit". I'll send a patch if i can find a way to fix correctly this bug.

-michael

----- Original Message ----- From: "Jared Williams" <jared.williams1@ntlworld.com>
To: "'Michael Vergoz'" <mv-php@binarysec.com>; "'Wez Furlong'" <kingwez@gmail.com>; "'Ilia Alshanetsky'" <ilia@prohost.org>
Cc: "'Nuno Lopes'" <nlopess@php.net>; "'PHPdev'" <internals@lists.php.net>
Sent: Friday, February 24, 2006 4:55 PM
Subject: RE: [PHP-DEV] recover from a segfault


The problem is that setrlimit() need privilege to expand the process stack. I don't think it's a good idea to use this system call to fix the too-high-function-stack bug. There is no really way to fix correctly this bug. However I think we should re-examined the execution flow of PECL functions.
How about core functions too.. Using array_walk_recursive to undo magic_quotes creates a stack smashing exploit. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


Thread (20 messages)

« previous php.internals (#22005) next »