sektioneins / suhosin7

Suhosin Extension for PHP 7.x
https://www.suhosin.org
Other
120 stars 25 forks source link

SIGSEGV in suhosin_zend_stream_open #24

Open the0ne opened 6 years ago

the0ne commented 6 years ago

PHP-Script that's being debugged is a customer's Joomla 3.9.0 Crash seems to happen when Joomla tries to read an .ini-file for it's localization.

$ php7.0 -v PHP 7.0.32-0ubuntu0.16.04.1 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.32-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies

$ gdb -q php7.0 Reading symbols from php7.0...(no debugging symbols found)...done. (gdb) run index.php Starting program: /usr/bin/php7.0 index.php [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault. 0x00007fffe258ee07 in suhosin_zend_stream_open ( filename=0x7fffdf8203d8 "/path/to/www/language/de-DE/de-DE.ini", handle=0x7fffffffa3b0) at /usr/local/src/suhosin7/execute.c:302 302 if ((execute_data != NULL) && (execute_data->opline != NULL) && (execute_data->opline->opcode == ZEND_INCLUDE_OR_EVAL)) { (gdb) bt

  1. 0x00007fffe258ee07 in suhosin_zend_stream_open ( filename=0x7fffdf8203d8 "/path/to/www/language/de-DE/de-DE.ini", handle=0x7fffffffa3b0) at /usr/local/src/suhosin7/execute.c:302
  2. 0x00005555557cc944 in zend_stream_fixup ()
  3. 0x0000555555782e6a in zend_ini_open_file_for_scanning ()
  4. 0x0000555555782bec in zend_parse_ini_file ()
  5. 0x00005555556ed789 in zif_parse_ini_file ()
  6. 0x0000555555834f30 in ?? ()
  7. 0x00005555557effcb in execute_ex ()
  8. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff3814a90) at /usr/local/src/suhosin7/execute.c:532
  9. 0x000055555583506d in ?? ()
  10. 0x00005555557effcb in execute_ex ()
  11. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff38149a0) at /usr/local/src/suhosin7/execute.c:532
  12. 0x000055555583506d in ?? ()
  13. 0x00005555557effcb in execute_ex ()
  14. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff38147e0) at /usr/local/src/suhosin7/execute.c:532
  15. 0x000055555583506d in ?? ()
  16. 0x00005555557effcb in execute_ex ()
  17. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff38143a0) at /usr/local/src/suhosin7/execute.c:532
  18. 0x000055555583506d in ?? ()
  19. 0x00005555557effcb in execute_ex ()
  20. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff3813e30) at /usr/local/src/suhosin7/execute.c:532
  21. 0x000055555583506d in ?? ()
  22. 0x00005555557effcb in execute_ex ()
  23. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff3813cc0) at /usr/local/src/suhosin7/execute.c:532
  24. 0x000055555583506d in ?? ()
  25. 0x00005555557effcb in execute_ex ()
  26. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff3813a50) at /usr/local/src/suhosin7/execute.c:532
  27. 0x000055555583506d in ?? ()
  28. 0x00005555557effcb in execute_ex ()
  29. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff3813540) at /usr/local/src/suhosin7/execute.c:532
  30. 0x000055555583506d in ?? ()
  31. 0x00005555557effcb in execute_ex ()
  32. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff38133e0) at /usr/local/src/suhosin7/execute.c:532
  33. 0x000055555583506d in ?? ()
  34. 0x00005555557effcb in execute_ex ()
  35. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff38132a0) at /usr/local/src/suhosin7/execute.c:532
  36. 0x000055555583506d in ?? ()
  37. 0x00005555557effcb in execute_ex ()
  38. 0x00007fffe258ef17 in suhosin_execute_ex (execute_data=0x7ffff3813030) at /usr/local/src/suhosin7/execute.c:532
  39. 0x00005555558445f7 in zend_execute ()
  40. 0x00005555557af5b3 in zend_execute_scripts ()
  41. 0x000055555574e4b0 in php_execute_script ()
  42. 0x00005555558462b7 in ?? ()
  43. 0x00005555556309d4 in main ()

(gdb)

the0ne commented 6 years ago

sorry for unintentionally "referencing" various other issues by pasting the raw gdb output.