|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79643 PHP with Opcache crashes when a file with specific name is included
Submitted: 2020-05-27 13:21 UTC Modified: 2020-05-27 14:23 UTC
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:3 (75.0%)
From: pluczkiewicz at wayfair dot com Assigned:
Status: Closed Package: opcache
PHP Version: 7.4.6 OS: Linux
Private report: No CVE-ID: None
 [2020-05-27 13:21 UTC] pluczkiewicz at wayfair dot com
PHP segfaults when a file with a very specific name is included, followed by another file (the first path must be exactly as it is in the test script, for the second one I had more luck with random values). 
I have tested 7.3.0, 7.4.3 and 7.4.6, all of them are segfaulting.
`opcache.interned_strings_buffer=0` seems to be required to get the segfault.

Test script:
Opcache config:

Script itself:

require_once '/wayfair/data/codebase/php/includes/filesystem/temporary_local_storage.php';
require_once 'rNSSDJBm2jVwL899rn2rA4g0PdC8Pb0S4mrd5Xfsqq00qdaaOW2PkZDOelKbI26iE64oYvrk7l';

echo 'NO CRASH';

Code on GitHub: (run with docker build -t opcache_crash . && docker run opcache_crash)

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-27 14:23 UTC]
-Status: Open +Status: Verified
 [2020-05-27 14:23 UTC]
can confirm - but it requires the first file to actually exist
 [2020-05-29 13:17 UTC] adbrvn at gmail dot com
Same behaviour.
One more example for reproduce
Tested on 7.4.4
 [2020-10-20 10:51 UTC]
Automatic comment on behalf of
Log: Fix bug #79643: Invalid memory read when opcache.interned_strings_buffer is 0
 [2020-10-20 10:51 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 03:01:29 2024 UTC