Bug #75817 [Fbk->NoF]: Fatal in calling session_start()

From: Date: Sun, 28 Mar 2021 04:22:08 +0000
Subject: Bug #75817 [Fbk->NoF]: Fatal in calling session_start()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233024@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75817&edit=1

 ID:               75817
 Updated by:       php-bugs@lists.php.net
 Reported by:      chensl6588 at gmail dot com
 Summary:          Fatal in calling session_start()
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          *General Issues
 Operating System: FreeBSD-10.2-i386
 PHP Version:      7.2.1
 Assigned To:      cmb
 Private report:   N

 New Comment:

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 "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2021-03-19 17:07:30] cmb@php.net

The effect to session_start() isn't the root cause, though;
re-classifying.

Anyhow, is the failing php_random_bytes() still an issue?  If so,
please provide a pull request[1] for better visibility.

[1] <https://github.com/php/php-src/pulls>

------------------------------------------------------------------------
[2018-01-15 09:44:00] chensl6588 at gmail dot com

Description:
------------
While PHP is running in FPM with chroot safe_mode, and the session.save_handler is
"files".

#ext/session/mod_files.c: PS_CREATE_SID_FUNC(files)
{{
    sid = php_session_create_id((void**)&data);
}}
This statement would always return NULL to sid, because of php_random_bytes() returning FAILURE.


SOLUTION:

ext/standard/random.c: 

Line 94: #elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__FreeBSD__) || (defined(__OpenBSD__)
&& OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >=
700000001))




Test script:
---------------
session_start();





------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=75817&edit=1


Thread (3 messages)

« previous php.bugs (#233024) next »