|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2020-01-21 14:21 UTC] wxhusst at gmail dot com
Description:
------------
AddressSanitizer:DEADLYSIGNAL
=================================================================
==116931==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000019 (pc 0x7fb588144ba5 bp 0x7fffc09a0570 sp 0x7fffc099fd08 T0)
==116931==The signal is caused by a READ memory access.
==116931==Hint: address points to the zero page.
#0 0x7fb588144ba4 /build/glibc-4WA41p/glibc-2.30/string/../sysdeps/x86_64/multiarch/strlen-avx2.S:62
#1 0x615eda in strlen /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc
#2 0x1c75c68 in _estrdup /home/raven/fuzz/php-src-php-7.4.2/Zend/zend_alloc.c:2617:11
#3 0x10c0d10 in zif_mb_convert_encoding /home/raven/fuzz/php-src-php-7.4.2/ext/mbstring/mbstring.c:3377:25
#4 0x242215d in ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER /home/raven/fuzz/php-src-php-7.4.2/Zend/zend_vm_execute.h:1269:2
#5 0x2131c97 in execute_ex /home/raven/fuzz/php-src-php-7.4.2/Zend/zend_vm_execute.h:53611:7
#6 0x2132d52 in zend_execute /home/raven/fuzz/php-src-php-7.4.2/Zend/zend_vm_execute.h:57913:2
#7 0x1eb6d8c in zend_execute_scripts /home/raven/fuzz/php-src-php-7.4.2/Zend/zend.c:1665:4
#8 0x1a9b754 in php_execute_script /home/raven/fuzz/php-src-php-7.4.2/main/main.c:2617:14
#9 0x255f9f0 in do_cli /home/raven/fuzz/php-src-php-7.4.2/sapi/cli/php_cli.c:961:5
#10 0x255c3a7 in main /home/raven/fuzz/php-src-php-7.4.2/sapi/cli/php_cli.c:1352:18
#11 0x7fb587fe01e2 in __libc_start_main /build/glibc-4WA41p/glibc-2.30/csu/../csu/libc-start.c:308:16
#12 0x602b3d in _start (/home/raven/fuzz/php-src-php-7.4.2/sapi/cli/php+0x602b3d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /build/glibc-4WA41p/glibc-2.30/string/../sysdeps/x86_64/multiarch/strlen-avx2.S:62
==116931==ABORTING
Test script:
---------------
<?php
try { try { mb_convert_encoding(str_repeat(chr(154), 257) + str_repeat(chr(40), 257) + str_repeat(chr(29), 17), str_repeat("A", 0x100), array("a" => 1, "b" => "2", "c" => 3.0)); } catch (Exception $e) { } } catch(Error $e) { }
?>
Expected result:
----------------
normal
Actual result:
--------------
crash
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
I can reproduce this. Here's a reduction: <?php mb_convert_encoding("", "UTF-8", [0]); Presumably non-string encodings are not handled correctly.