Bug #80881 [Com]: open_basedir crashes Apache

From: Date: Sat, 05 Jun 2021 18:49:51 +0000
Subject: Bug #80881 [Com]: open_basedir crashes Apache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234224@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80881&edit=1

 ID:                 80881
 Comment by:         simbiat at outlook dot com
 Reported by:        simbiat at outlook dot com
 Summary:            open_basedir crashes Apache
 Status:             Open
 Type:               Bug
 Package:            Safe Mode/open_basedir
 Operating System:   Windows 10.0.19042.868]
 PHP Version:        8.0.3
 Block user comment: N
 Private report:     N

 New Comment:

Looks like it can crash with commented out open_basedir. Replicable on 8.0.7: https://apaste.info/0cPr and may be related to https://bugs.php.net/bug.php?id=80726 since CLI can
also crash periodically on same machine.


Previous Comments:
------------------------------------------------------------------------
[2021-04-13 09:14:03] simbiat at outlook dot com

Nope, disabling AV did not help at all.

------------------------------------------------------------------------
[2021-04-13 09:02:27] simbiat at outlook dot com

Looks like something else has changed and now, when working in phpMyAdmin I am getting crashes even
if basedir is not restricted. And crashes are different, now referencing php8ts.dl: https://apaste.info/yelL

Not sure, but I think the only thing, that has changed on my PC since last time is... Perhaps AV
update? But definitely no new KBs were installed. I will check the behavior with AV disabled, but
not sure if it will provide anything.

------------------------------------------------------------------------
[2021-03-23 17:59:25] simbiat at outlook dot com

It is on my machine, it's just that I use OneDrive as backup as well and it's finicky with
symlinks. It's not a critical issue, that's for sure, at least, unless someone decided to
host actual PROD environment on OneDrive, which seems... Unadvisable. Still, if it will be fixed
someday, that would be great.

------------------------------------------------------------------------
[2021-03-23 14:05:45] cmb@php.net

> Crashed on official build as well: […]

It seems the memory mismanagement happens in virtual_file_ex[1],
but apparently the function is inlined, so the stack backtrace
isn't really helpful.

> It looks like it crashes during stopping of the service.

That backtrace looks like a new thread is started, and being shut
down right away.  This may be just a consequence of the former
crash.

Not sure how to go on with this, particularly since support for
OneDrive hosted Websites is of very low priority for the PHP on
Windows team.  I suggest to either download a copy of the Website
to your machine (or consider to use a VCS instead), or to disable
open_basedir.

[1] <https://github.com/php/php-src/blob/php-8.0.3/Zend/zend_virtual_cwd.c#L1248>

------------------------------------------------------------------------
[2021-03-19 08:26:43] simbiat at outlook dot com

Crashed on official build as well: https://apaste.info/utsD
(analyzed from WinDBG)
When I moved htdocs to C:/htdocs - it did not fail. But... It looks like it crashes during stopping
of the service. No logs in Apache, but here's the debug: https://apaste.info/tX0l

Reports from DebugDiag for both cases - https://1drv.ms/u/s!AsaK_C2Xv0I4gunxGl8Cn2AOkewerww?e=aw1tGd

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=80881


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


Thread (18 messages)

« previous php.bugs (#234224) next »