php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80588 opcache causes include() to include an utterly random unrelated file
Submitted: 2021-01-04 18:44 UTC Modified: 2021-02-23 11:56 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: php4fan at gmail dot com Assigned:
Status: Open Package: opcache
PHP Version: 7.4.13 OS: linux debian 9
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php4fan at gmail dot com
New email:
PHP Version: OS:

 

 [2021-01-04 18:44 UTC] php4fan at gmail dot com
Description:
------------
In my code I have the following code executed many times:

<?php
eval("
   include("/path/to/a/file_1.php");
");
?>

It is not as direct as that: the evaled string is fetched from a db rather than being a literal, but it's fixed as the above.

Under some apparently random circumstances, at the Nth time that gets executed, it executes a completely unrelated file /path/to/another/file_2.php instead of the one whose name is being passed to include().

Disabling opcache fixes the issue.

I haven't been able to recreate a minimal, sharable, reproducible test case. With my code it happens systematically 100% of the time that this given script is executed.

It looks almost as if, because of a hash collision or something of that sort (uttelry random but at the same time 100% reproducible), the opcache ended up fetching a completely unrelated precompiled piece of bytecode.


This is a REGRESSION, it happens with PHP 7.4.11 but not with PHP 5.6


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-23 11:47 UTC] php4fan at gmail dot com
Why is this being ignored? The impact of this is devastating.
 [2021-02-23 11:56 UTC] nikic@php.net
It's unlikely this can be addressed without a way to reproduce this issue.
 [2023-06-09 09:05 UTC] hfdifguojoweeui322 at gmail dot com
That was so amazing article I loved that.


More info : - (https://www.ballsportsgear.com/pickleball-serving-tips/)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC