Buffer over-write vulnerability in finfo_open triggered by malformed magic file was found, causing segfault when running with environment variable USE_ZEND_ALLOC set to 0, and also when compiled with ASAN with USE_ZEND_ALLOC set and unset. This issue was fixed in file-5.23. Upstream bug (contains reproducer): http://bugs.gw.com/view.php?id=522 PHP bug: https://bugs.php.net/bug.php?id=71527 Upstream patch: https://github.com/file/file/commit/6713ca45e7757297381f4b4cdb9cf5e624a9ad36 https://git.php.net/?p=php-src.git;a=commit;h=fe13566c93f118a15a96320a546c7878fd0cfc5e
Created php tracking bugs for this issue: Affects: fedora-all [bug 1323712]
php-5.6.20-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
php-5.6.20-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Mitigation: Do not use untrusted magic files.
Magic file is really a configuration file for file/libmagic. The use of untrusted magic file is unlikely, the typical use of file is to identify types of (possibly untrusted) files using fully trusted magic files. In any typical use case, this does not cross any trust boundary and hence the fix is not planned to be backported as security fix to already released Red Hat products.
This issue has been addressed in the following products: Red Hat Software Collections for Red Hat Enterprise Linux 6 Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS Red Hat Software Collections for Red Hat Enterprise Linux 7 Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS Via RHSA-2016:2750 https://rhn.redhat.com/errata/RHSA-2016-2750.html