php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31212 Crash related to php_session_start and configuration
Submitted: 2004-12-20 23:35 UTC Modified: 2004-12-29 18:35 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: jibe at sdf dot lonestar dot org Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.3.10 OS: FreeBSD 5.2.1
Private report: No CVE-ID: None
 [2004-12-20 23:35 UTC] jibe at sdf dot lonestar dot org
Description:
------------
hi gang,

using the "session" extension was crashing apache here, making drupal and other software unusable.  

With session.save_handler set to "user" in php.ini, I can
see that "save_path" arrives as 0x0 in "ps_open_user" in
mod_user, and apache crashes.

My fix for now is to hardcode this

        PS(save_path) = malloc(strlen("/tmp/") + 1);
        strcpy(PS(save_path), "/tmp/");

in session.c, and things work fine.  Unfortunately I have
no expertise to track this bug much more.

Cheers!



Reproduce code:
---------------
Use drupal..

Expected result:
----------------
Apache crashes, and your dmesg is full of 

[...]
pid 99709 (httpd), uid 80: exited on signal 11
[...]

Actual result:
--------------
Attaching httpd with gdb (session module compiled in debug
mode):

(gdb) 
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x2906b8bf in ps_open_user (mod_data=0xffffff00, save_path=0x0, 
    session_name=0x85b12ac "POSTNUKESID")
    at /usr/ports/www/php4-session/work/php-4.3.10/ext/session/mod_user.c:95
95              SESS_ZVAL_STRING(save_path, args[0]);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-21 10:20 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2004-12-29 18:35 UTC] sniper@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.


 [2005-02-08 02:18 UTC] karnaugh at karnaugh dot za dot net
Hi

I am experiencing this problem as well on FreeBSD 5.0 with php4-session-4.3.10_2

PHP dies (Segmentation Fault) on session_start()
 [2005-03-30 15:44 UTC] gb at isis dot u-strasbg dot fr
portupgrade -Rf php4-session fixes this problem I have just encountered too.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 14:01:29 2024 UTC