php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78318 Segmentation fault at /usr/src/debug/php-7.2.20/Zend/zend_hash.c:489
Submitted: 2019-07-21 11:22 UTC Modified: 2019-07-21 11:44 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: makhomed at gmail dot com Assigned:
Status: Open Package: PCRE related
PHP Version: 7.2.20 OS: CentOS 7.6
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-07-21 11:22 UTC] makhomed at gmail dot com
Description:
------------
# php -v
PHP 7.2.20 (cli) (built: Jul  2 2019 13:37:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.20, Copyright (c) 1999-2018, by Zend Technologies


Actual result:
--------------
# gdb /usr/sbin/php-fpm coredump.php-fpm.7133.1563445091
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/php-fpm...Reading symbols from /usr/lib/debug/usr/sbin/php-fpm.debug...done.
done.
[New LWP 7133]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `php-fpm: pool forum            '.
Program terminated with signal 11, Segmentation fault.
#0  zend_hash_find_bucket (key=0x7f5aee4d3c08, ht=0x55ea5a0b5d20 <pcre_globals>) at /usr/src/debug/php-7.2.20/Zend/zend_hash.c:489
489                          EXPECTED(ZSTR_LEN(p->key) == ZSTR_LEN(key)) &&
Missing separate debuginfos, use: debuginfo-install ImageMagick6-libs-6.9.10.54-1.el7.remi.x86_64 bzip2-libs-1.0.6-13.el7.x86_64 cyrus-sasl-lib-2.1.26-23.el7.x86_64 elfutils-libelf-0.172-2.el7.x86_64 elfutils-libs-0.172-2.el7.x86_64 expat-2.1.0-10.el7_3.x86_64 fftw-libs-double-3.3.3-8.el7.x86_64 fontconfig-2.13.0-4.3.el7.x86_64 freetype-2.8-12.el7_6.1.x86_64 fribidi-1.0.2-1.el7.x86_64 gd-last-2.2.5-8.el7.remi.x86_64 glib2-2.56.1-4.el7_6.x86_64 glibc-2.17-260.el7_6.6.x86_64 graphite2-1.3.10-1.el7_3.x86_64 harfbuzz-1.7.5-2.el7.x86_64 jbigkit-libs-2.0-11.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-37.el7_6.x86_64 lcms2-2.6-3.el7.x86_64 libICE-1.0.9-9.el7.x86_64 libSM-1.2.2-2.el7.x86_64 libX11-1.6.5-2.el7.x86_64 libXau-1.0.8-2.1.el7.x86_64 libXext-1.3.3-3.el7.x86_64 libXpm-3.5.12-1.el7.x86_64 libXt-1.1.5-3.el7.x86_64 libacl-2.2.51-14.el7.x86_64 libargon2-20161029-3.el7.x86_64 libattr-2.4.46-13.el7.x86_64 libcap-2.22-9.el7.x86_64 libcom_err-1.42.9-13.el7.x86_64 libcurl-7.29.0-51.el7.x86_64 libgcc-4.8.5-36.el7_6.2.x86_64 libgcrypt-1.5.3-14.el7.x86_64 libgomp-4.8.5-36.el7_6.2.x86_64 libgpg-error-1.12-3.el7.x86_64 libicu62-62.1-3.el7.remi.x86_64 libidn-1.28-4.el7.x86_64 libjpeg-turbo-1.2.90-6.el7.x86_64 libmcrypt-2.5.8-13.el7.x86_64 libpng-1.5.13-7.el7_2.x86_64 libraqm-0.1.1-1.el7.x86_64 libselinux-2.5-14.1.el7.x86_64 libssh2-1.4.3-12.el7_6.2.x86_64 libstdc++-4.8.5-36.el7_6.2.x86_64 libtiff-4.0.3-27.el7_3.x86_64 libtool-ltdl-2.4.2-22.el7_3.x86_64 libuuid-2.23.2-59.el7_6.1.x86_64 libwebp7-1.0.2-1.el7.remi.x86_64 libxcb-1.13-1.el7.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 libxslt-1.1.28-5.el7.x86_64 lz4-1.7.5-2.el7.x86_64 nspr-4.19.0-1.el7_5.x86_64 nss-3.36.0-7.1.el7_6.x86_64 nss-softokn-freebl-3.36.0-5.el7_5.x86_64 nss-util-3.36.0-1.1.el7_6.x86_64 oniguruma5-6.9.2-2.el7.remi.x86_64 openldap-2.4.44-21.el7_6.x86_64 openssl-libs-1.0.2k-16.el7_6.1.x86_64 pcre-8.32-17.el7.x86_64 php-pecl-apcu-5.1.17-1.el7.remi.7.2.x86_64 php-pecl-imagick-3.4.4-1.el7.remi.7.2.x86_64 php-pecl-mcrypt-1.0.2-2.el7.remi.7.2.x86_64 sqlite-3.7.17-8.el7.x86_64 systemd-libs-219-62.el7_6.7.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-18.el7.x86_64
(gdb) bt
#0  zend_hash_find_bucket (key=0x7f5aee4d3c08, ht=0x55ea5a0b5d20 <pcre_globals>) at /usr/src/debug/php-7.2.20/Zend/zend_hash.c:489
#1  zend_hash_find (ht=ht@entry=0x55ea5a0b5d20 <pcre_globals>, key=key@entry=0x7f5aee4d3c08) at /usr/src/debug/php-7.2.20/Zend/zend_hash.c:1959
#2  0x000055ea59b14dd6 in zend_hash_find_ptr (key=0x7f5aee4d3c08, ht=0x55ea5a0b5d20 <pcre_globals>) at /usr/src/debug/php-7.2.20/Zend/zend_hash.h:740
#3  pcre_get_compiled_regex_cache (regex=0x7f5aee4d3c08) at /usr/src/debug/php-7.2.20/ext/pcre/php_pcre.c:360
#4  0x000055ea59b1784e in php_do_pcre_match (execute_data=0x7f5b0e81c010, return_value=0x7f5b0e81bfa0, global=0) at /usr/src/debug/php-7.2.20/ext/pcre/php_pcre.c:730
#5  0x000055ea59d2318b in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER () at /usr/src/debug/php-7.2.20/Zend/zend_vm_execute.h:617
#6  execute_ex (ex=0x7f5aee6f7c08) at /usr/src/debug/php-7.2.20/Zend/zend_vm_execute.h:59750
#7  0x000055ea59d28cfe in zend_execute (op_array=op_array@entry=0x7f5b0e88f000, return_value=return_value@entry=0x7f5aee4e51b8) at /usr/src/debug/php-7.2.20/Zend/zend_vm_execute.h:63776
#8  0x000055ea59c766f3 in zend_execute_scripts (type=243382208, type@entry=8, retval=0x7f5aee4e51b8, retval@entry=0x0, file_count=file_count@entry=3) at /usr/src/debug/php-7.2.20/Zend/zend.c:1498
#9  0x000055ea59c10e78 in php_execute_script (primary_file=primary_file@entry=0x7ffcedcc96b0) at /usr/src/debug/php-7.2.20/main/main.c:2594
#10 0x000055ea59a8559a in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/php-7.2.20/sapi/fpm/fpm/fpm_main.c:1989
(gdb)


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-21 11:23 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2019-07-21 11:23 UTC] requinix@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2019-07-21 11:44 UTC] requinix@php.net
-Status: Feedback +Status: Open -Package: Unknown/Other Function +Package: PCRE related
 [2019-07-21 11:44 UTC] requinix@php.net
This is probably from phpBB too, right?
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Mar 28 22:01:23 2020 UTC