Bug #66095 [NEW]: Bundled libmagic has public symbols and conflicts with system libmagic

From: Date: Thu, 14 Nov 2013 13:58:59 +0000
Subject: Bug #66095 [NEW]: Bundled libmagic has public symbols and conflicts with system libmagic
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182757@lists.php.net to get a copy of this message
From: vitalif at mail dot ru Operating system: Linux PHP version: 5.5.6 Package: Filesystem function related Bug Type: Bug Bug description:Bundled libmagic has public symbols and conflicts with system libmagic Description: ------------ In the PHP fileinfo extension, there is a bundled libmagic with public symbols. So when the fileinfo extension is loaded (either as a shared object or when built into PHP itself) - it can conflict with system libmagic. The conflict appears when you have different system libmagic version, and when you load PHP module into Apache along with some other Apache module that uses libmagic, for example - mod_dav_svn (Subversion DAV server). The result depends on the loading order: * If libphp5.so (or fileinfo.so) is loaded first, then Subversion gets incorrect libmagic symbols and crashes * If mod_dav_svn is loaded first, then PHP fileinfo gets incorrect libmagic symbols and also crashes The bundled extension should have ALL libmagic symbols declared as static. It can be achieved via overriding 'public/protected' macros in libmagic code and including all libmagic sources into fileinfo.c instead of compiling and linking them separately. (See the attached patch) -- Edit bug report at https://bugs.php.net/bug.php?id=66095&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66095&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66095&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66095&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66095&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66095&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66095&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66095&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66095&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66095&r=support Expected behavior: https://bugs.php.net/fix.php?id=66095&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66095&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66095&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66095&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66095&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66095&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66095&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66095&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66095&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66095&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66095&r=mysqlcfg

« previous php.bugs (#182757) next »