Bug #73461 [NEW]: Segfault when always regenerating session id from read handler [PHP 7 only]
From: love at sickpeople dot se
Operating system:
PHP version: 7.1.0RC5
Package: Reproducible crash
Bug Type: Bug
Bug description:Segfault when always regenerating session id from read handler [PHP 7 only]
Description:
------------
The code below segfaults in PHP 7.x including PHP 7.1 RC5.
Basically this is a segfault due to infinite recursion and I know there
has been reports about that before. I created this bug for one main
reason: this crash does NOT occur in PHP 5.x, including 5.6.27. It
"appeared" in PHP 7.0.
Please see demo here: https://3v4l.org/Lc1cX
Test script:
---------------
session_set_save_handler ('sess', 'sess', 'sess_read',
'sess', 'sess',
'sess');
session_start ();
Function sess ($foo = 'foo') { return true; }
Function sess_read ($id)
{
session_regenerate_id (false);
}
--
Edit bug report at https://bugs.php.net/bug.php?id=73461&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73461&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73461&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73461&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73461&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73461&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73461&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73461&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73461&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73461&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73461&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73461&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73461&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73461&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73461&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73461&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73461&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73461&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73461&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73461&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73461&r=mysqlcfg
Thread (2 messages)
- love at sickpeople dot se