ID: 30273 User updated by: oskar at lanstorm dot org Reported By: oskar at lanstorm dot org -Status: Feedback +Status: Open Bug Type: Apache related Operating System: Linux 2.4.26-grsec PHP Version: 5.0.2 New Comment:
Re. I cannot provide more info cuz that all the output from gdb.PHP is compiled with --enable-debug option.And in gdb i see only this one frame. Previous Comments: ------------------------------------------------------------------------ [2004-09-29 16:49:13] [EMAIL PROTECTED] Read the bt instructions again; the trace you've provided is not terribly helpful. Make sure you build a debug build of PHP and paste the full trace. ------------------------------------------------------------------------ [2004-09-29 15:55:12] oskar at lanstorm dot org Backtrace: (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x44041a3c in OBJ_obj2nid () from /usr/lib/libcrypto.so.0 (gdb) bt #0 0x44041a3c in OBJ_obj2nid () from /usr/lib/libcrypto.so.0 That seems to be openssl bug.Maybe i shuld send it to they buglist?Dunno:| ------------------------------------------------------------------------ [2004-09-29 14:36:31] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2004-09-29 13:34:45] oskar at lanstorm dot org Description: ------------ Hey. I`ve tried to send encrypted and signed e-mail via php using the openssl_pkcs7* functions and they crash my apache. Code looks like this... <? $data = <<<EOD To jest test wiadomosci. Powinna byc zaszyfrowana i podpisana cyfrowo. EOD; $plik = fopen('oskar.pem', 'r'); $key=fread($plik, 10000); fclose($plik); // save message to file $fp = fopen('msg.txt', 'w'); fwrite($fp, $data); fclose($fp); //podpisz if (openssl_pkcs7_sign('msg.txt', 'signed.txt', 'file:///usr/local/apache/htdocs/oskar.pem', array('file:///usr/local/apache/htdocs/oskar.pem', 'pass'), array('To' => 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>'))) { //szyfruj if (openssl_pkcs7_encrypt('signed.txt', 'enc.txt', $key, array('To' => 'Oskar <[EMAIL PROTECTED]>', 'From' => 'oskar <[EMAIL PROTECTED]>', 'Subject' => 'Zaszyfrowana i podpisana elektronicznie wiadomosc ze strony www.'))) { // slij exec(ini_get('sendmail_path') . ' < enc.txt'); } } else { echo(openssl_error_string()); } ?> When i`m lunching the script apache child process segfault:|. [Wed Sep 29 13:20:35 2004] [notice] child pid 2586 exit signal Segmentation fault (11) Everything else is ok.PHP works fine on "normal" (not using openssl functions) scripts.But on this one it crash.Code is good because somethimes it works and don`t crash. Regards. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30273&edit=1