Bug #76276 [Com]: PCRE Segmentation fault before PHP7
| From: | spam2 at rhsoft dot net | Date: | Fri, 27 Apr 2018 14:41:22 +0000 |
| Subject: | Bug #76276 [Com]: PCRE Segmentation fault before PHP7 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-214937@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76276&edit=1
ID: 76276
Comment by: spam2 at rhsoft dot net
Reported by: drealecs at gmail dot com
Summary: PCRE Segmentation fault before PHP7
Status: Open
Type: Bug
Package: PCRE related
Operating System: Linux
PHP Version: 5.6.36
Block user comment: N
Private report: N
New Comment:
> There seems to be a buffer overflow in all
> PHP version 4.* and 5.* but not on PHP 7.*
so why do you bother to write a new bugreport at 2018-04-27 given that the only 2 supported versions
are 7.1 and 7.2?
Previous Comments:
------------------------------------------------------------------------
[2018-04-27 14:37:55] drealecs at gmail dot com
https://3v4l.org/RJt1X
------------------------------------------------------------------------
[2018-04-27 14:36:34] drealecs at gmail dot com
Description:
------------
There seems to be a buffer overflow in all PHP version 4.* and 5.*
but not on PHP 7.*
Test script:
---------------
$string = '';
for ($i = 0; $i < 10000; $i++) {
$string .= chr(rand(65, 122));
}
echo "Calling preg_match_all()\n";
preg_match_all('/(\D|3)*/', $string, $matches);
echo "It didn't broke php\n";
Expected result:
----------------
Calling preg_match_all()
It didn't broke php
Actual result:
--------------
Calling preg_match_all()
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76276&edit=1