Bug #54350 [Ver->Csd]: Memory corruption with user_filter

From: Date: Thu, 07 Oct 2021 09:47:25 +0000
Subject: Bug #54350 [Ver->Csd]: Memory corruption with user_filter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237073@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54350&edit=1 ID: 54350 Updated by: git@php.net Reported by: decoder-php at own-hero dot net Summary: Memory corruption with user_filter -Status: Verified +Status: Closed Type: Bug Package: Reproducible crash Operating System: Linux x86-64 PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Automatic comment on behalf of nikic Revision: https://github.com/php/php-src/commit/15197702888f0641c1e9f648311727b954ea552c Log: Fixed bug #54350 Previous Comments: ------------------------------------------------------------------------ [2021-10-06 18:49:33] bodik at cesnet dot cz FYI likely a public PoC for the bug is here https://github.com/mm0r1/exploits/blob/master/php-filter-bypass/exploit.php ------------------------------------------------------------------------ [2021-01-08 16:36:43] cmb@php.net A respective comment in the sources[1] clarifies: | filter resources are cleaned up by the stream destructor, | keeping a reference to the stream resource here would prevent | it from being destroyed properly So we need to convert stream resources to objects, where we can introduce a cycle, which will eventually be resolved by the garbage collector. [1] <https://github.com/php/php-src/blob/php-8.0.1/ext/standard/user_filters.c#L234-L236> ------------------------------------------------------------------------ [2013-06-05 12:00:25] arjen at react dot com Also broken in 5.4.15: https://gist.github.com/anonymous/5713377 ------------------------------------------------------------------------ [2011-12-27 09:59:27] stas@php.net Oops, wrong bug, sorry. ------------------------------------------------------------------------ [2011-12-27 09:58:54] stas@php.net Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=54350 -- Edit this bug report at https://bugs.php.net/bug.php?id=54350&edit=1

« previous php.bugs (#237073) next »