php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27816 unserialize crash?
Submitted: 2004-03-31 15:17 UTC Modified: 2004-04-11 12:14 UTC
From: rudi at jawmail dot org Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 4.3.5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rudi at jawmail dot org
New email:
PHP Version: OS:

 

 [2004-03-31 15:17 UTC] rudi at jawmail dot org
Description:
------------
This crash occurs in a large web application when somewhere a string with an UTF-8 encoded string with a multibyte character on the first place (apparently?) gets unserialized. It works okay if multi-byte characters are in other parts of the string, just not the first character.

Working on a small crash script... 

Actual result:
--------------
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

Program received signal SIGSEGV, Segmentation fault.
php_var_unserialize (rval=0xbfff79ac, p=0xbfff7994, max=0x823ec51 "", var_hash=0xbfff7998)
at /compile/php-4.3.5/ext/standard/var_unserializer.c:318
318 if(yych == ':') goto yy74;
(gdb) bt
#0 php_var_unserialize (rval=0xbfff79ac, p=0xbfff7994, max=0x823ec51 "", var_hash=0xbfff7998)
at /compile/php-4.3.5/ext/standard/var_unserializer.c:318
#1 0x4025815a in zif_unserialize (ht=1, return_value=0x8201b84, this_ptr=0x0, return_value_used=1)
at /compile/php-4.3.5/ext/standard/var.c:681
#2 0x402be7d5 in execute (op_array=0x83c5474) at /compile/php-4.3.5/Zend/zend_execute.c:1621
#3 0x402be9aa in execute (op_array=0x83c531c) at /compile/php-4.3.5/Zend/zend_execute.c:1665
#4 0x402be9aa in execute (op_array=0x80f6644) at /compile/php-4.3.5/Zend/zend_execute.c:1665
#5 0x402be9aa in execute (op_array=0x80f64f4) at /compile/php-4.3.5/Zend/zend_execute.c:1665
#6 0x402be9aa in execute (op_array=0x829361c) at /compile/php-4.3.5/Zend/zend_execute.c:1665
#7 0x402c4615 in execute (op_array=0x82da95c) at /compile/php-4.3.5/Zend/zend_execute.c:2186
#8 0x402be9aa in execute (op_array=0x838e6f4) at /compile/php-4.3.5/Zend/zend_execute.c:1665
#9 0x402ab3c3 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /compile/php-4.3.5/Zend/zend.c:889
#10 0x4028400b in php_execute_script (primary_file=0xbffff848) at /compile/php-4.3.5/main/main.c:1731
#11 0x402c71df in apache_php_module_main (r=0x811f214, display_source_mode=0)
at /compile/php-4.3.5/sapi/apache/sapi_apache.c:54
#12 0x402c7d73 in send_php (r=0x811f214, display_source_mode=0, filename=0x0)
at /compile/php-4.3.5/sapi/apache/mod_php4.c:620
#13 0x402c7dd4 in send_parsed_php (r=0x811f214) at /compile/php-4.3.5/sapi/apache/mod_php4.c:635
#14 0x806c5a3 in ap_invoke_handler ()
#15 0x80800e9 in process_request_internal ()
#16 0x808014c in ap_process_request ()
#17 0x807771e in child_main ()
#18 0x80778ac in make_child ()
#19 0x8077a09 in startup_children ()
#20 0x8078046 in standalone_ma

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-31 15:23 UTC] derick@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 possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.
 [2004-04-05 08:58 UTC] sniper@php.net
Check also your bison/flex versions..

 [2004-04-11 12:14 UTC] iliaa@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC