|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Sec Bug #68960 Bundled PCRE affected by CVE-2014-8964
Submitted: 2015-01-30 10:22 UTC Modified: 2015-03-20 05:50 UTC
From: thoger at redhat dot com Assigned: remi (profile)
Status: Closed Package: PCRE related
PHP Version: 5.6.5 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
2 + 22 = ?
Subscribe to this entry?

 [2015-01-30 10:22 UTC] thoger at redhat dot com
A heap buffer overflow related to handling of zero-repeat assertions was reported and fixed upstream:

Fix is expected to be included in the next PCRE upstream release.

Test script:
php -r 'preg_match("/(?(?=)*)/", "");'

Actual result:
Crash/SEGV on invalid memory read.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-30 10:40 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: remi
 [2015-01-30 10:40 UTC]
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

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.

 [2015-01-30 12:54 UTC] thoger at redhat dot com
Sorry, recent versions indeed no longer crash.  The fix resolves crash for 5.5, but it does not seem to make a difference for 5.6 (i.e. 5.6.3 does not crash even though it does not have the fix).  In the latest versions in all branches (5.6.5, 5.5.21, and 5.4.37), valgrind still detects invalid read.  I haven't investigated if test can be adjusted to bypass the linked fix, only wanted to make you aware of a public CVE for one of the bundled libraries.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Oct 23 02:03:34 2021 UTC