#31479 [Opn->Ver]: chunk_split() segfaults with too high chunklen

From: Date: Tue, 11 Jan 2005 03:54:08 +0000
Subject: #31479 [Opn->Ver]: chunk_split() segfaults with too high chunklen
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-71810@lists.php.net to get a copy of this message
 ID:               31479
 Updated by:       sniper@php.net
 Reported By:      gz at moonky dot de
-Status:           Open
+Status:           Verified
 Bug Type:         Reproducible crash
-Operating System: linux
+Operating System: *
-PHP Version:      4.3.10
+PHP Version:      4CVS, 5CVS (2005-01-11)


Previous Comments:
------------------------------------------------------------------------

[2005-01-10 22:57:16] gz at moonky dot de

Description:
------------
chunk_split() segfaults when chunklen is too big (possible dos?)

Reproduce code:
---------------
<?php
chunk_split(".", 1000000000);
?>

Expected result:
----------------
ehrrm... ;-)

Actual result:
--------------
(gdb) bt
#0  0xb7d79cef in memcpy () from /lib/tls/libc.so.6
#1  0x080e6c21 in php_chunk_split (src=0x81f4afc "", srclen=1,
end=0x8180d20 "\r\n", endlen=2, chunklen=1000000000, 
    destlen=0xbfffd544) at
/home/moonky/src/php-4.3.9/ext/standard/string.c:1521
#2  0x080e6f98 in zif_chunk_split (ht=2, return_value=0x81ef874,
this_ptr=0x0, return_value_used=0)
    at /home/moonky/src/php-4.3.9/ext/standard/string.c:1582
[...]


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31479&edit=1


Thread (3 messages)

« previous php.bugs (#71810) next »