Bug #71397 [NEW]: mb_send_mail segmentation fault
| From: | public+php dot net at bastelstu dot be | Date: | Sun, 17 Jan 2016 14:29:42 +0000 |
| Subject: | Bug #71397 [NEW]: mb_send_mail segmentation fault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-198731@lists.php.net to get a copy of this message | ||
From: public+php dot net at bastelstu dot be
Operating system: Debian Jessie
PHP version: 7.0.2
Package: Reproducible crash
Bug Type: Bug
Bug description:mb_send_mail segmentation fault
Description:
------------
PHP 7.0.2 built by the following Dockerfile
(https://github.com/docker-library/php/blob/cd075c9d4e53b255b4af6691a7ee10354d7fbb8d/7.0/fpm/Dockerfile)
crashes in mb_send_mail when the Content-Transfer-Encoding-Header is
set. The issue basically is the same as #71066.
Test script:
---------------
<?php
var_dump(mb_send_mail("mail@example.com", "subject", "body",
"Content-Transfer-Encoding: base64"));
Actual result:
--------------
(gdb) bt
#0 __strcasecmp_l_sse42 () at
../sysdeps/x86_64/multiarch/strcmp-sse42.S:165
#1 0x00000000005a7709 in mbfl_name2encoding (
name=0x600000019 <error: Cannot access memory at address
0x600000019>)
at /root/php-7.0.2/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c:237
#2 0x00000000005a78a4 in mbfl_name2no_encoding (
name=0x600000019 <error: Cannot access memory at address
0x600000019>)
at /root/php-7.0.2/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c:290
#3 0x00000000005b1d4e in zif_mb_send_mail
(execute_data=0x7fede20149a0,
return_value=0x7fede2014970)
at /root/php-7.0.2/ext/mbstring/mbstring.c:4151
#4 0x00000000007f3a8a in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
at /root/php-7.0.2/Zend/zend_vm_execute.h:714
#5 0x00000000007f2f1c in execute_ex (ex=0x7fede2014030)
at /root/php-7.0.2/Zend/zend_vm_execute.h:414
#6 0x00000000007f3031 in zend_execute (op_array=0x7fede2070000,
return_value=0x0) at /root/php-7.0.2/Zend/zend_vm_execute.h:458
#7 0x0000000000798df6 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/php-7.0.2/Zend/zend.c:1427
#8 0x000000000070bf40 in php_execute_script
(primary_file=0x7fff015c1290)
at /root/php-7.0.2/main/main.c:2471
#9 0x000000000085e50a in main (argc=3, argv=0x7fff015c1518)
at /root/php-7.0.2/sapi/cgi/cgi_main.c:2453
(gdb)
--
Edit bug report at https://bugs.php.net/bug.php?id=71397&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71397&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71397&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71397&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71397&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71397&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71397&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71397&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71397&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71397&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71397&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71397&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71397&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71397&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71397&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71397&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71397&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71397&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71397&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71397&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71397&r=mysqlcfg