Mantis - Quercus
Viewing Issue Advanced Details
2253 major always 12-13-07 14:19 12-17-07 09:09
koreth  
ferg  
normal  
closed 3.1.4  
fixed  
none    
none 3.1.5  
0002253: Static class variables leak across concurrent requests
<?php
class MyClass {
    static public $var = 0;
}
for ($i = 0; $i < 100000; $i++) {
    MyClass::$var++;
}
print MyClass::$var . "\n";


If you run this repeatedly one request at a time, you get "100000" each time. However, if you issue parallel requests, you don't. For example:

% links -source http://localhost:8080/test/static.php [^] & ; links -source http://localhost:8080/test/static.php [^]
176799
184416

So it looks like there is some information leakage across requests here, which obviously is not only a security hole but also probably really hard for app developers to track down since it'd be intermittent in a production environment.

Notes
(0002579)
ferg   
12-17-07 09:09   
php/09b-