Bug #76276 [Com]: PCRE Segmentation fault before PHP7
| From: | drealecs at gmail dot com | Date: | Fri, 27 Apr 2018 14:37:55 +0000 |
| Subject: | Bug #76276 [Com]: PCRE Segmentation fault before PHP7 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-214936@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: drealecs at gmail dot com
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:
https://3v4l.org/RJt1X
Previous Comments:
------------------------------------------------------------------------
[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