The ftp_genlist() function of the ftp extension is prone to an integer overflow, which may result in remote code execution under certain circumstances. Upstream report: https://bugs.php.net/bug.php?id=69545 Upstream fix: http://git.php.net/?p=php-src.git;a=commitdiff;h=ac2832935435556dc593784cd0087b5e576bbe4d CVE request: http://seclists.org/oss-sec/2015/q2/479
Created php tracking bugs for this issue: Affects: fedora-all [bug 1223447]
php-5.6.9-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.9-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
php-5.5.25-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
A mitigating factor here is that counter which is overflown is incremented based on actually received data. Hence application needs to consume ~2GB (or ~512MB on 32bit platforms when using certain older PHP versions) of server response data to trigger overflow. Upstream fix applied in versions 5.4.41, 5.5.25 and 5.6.9 was found to be incomplete, still making it possible to trigger overflow on 32bit platforms: https://bugs.php.net/bug.php?id=69545#1431550655 Additionally, when backporting fix to older PHP versions (prior to 5.4.22 and 5.5.6), we need to include this fix to avoid integer overflow in the third argument to safe_emalloc(): http://git.php.net/?p=php-src.git;a=commitdiff;h=8f4a6d6e1b6c36259a5dc865d16f0dad76f2f2c9 A related commit, which is really a cosmetic change, but is needed to have 8f4a6d6 commit above apply cleanly: http://git.php.net/?p=php-src.git;a=commitdiff;h=1494298231072d5991e76db5ef25f20e81018106
(In reply to Tomas Hoger from comment #5) > Upstream fix applied in versions 5.4.41, 5.5.25 and 5.6.9 was found to be > incomplete, still making it possible to trigger overflow on 32bit platforms: > > https://bugs.php.net/bug.php?id=69545#1431550655 Upstream fix was corrected via this commit: http://git.php.net/?p=php-src.git;a=commitdiff;h=0765623d6991b62ffcd93ddb6be8a5203a2fa7e2
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2015:1135 https://rhn.redhat.com/errata/RHSA-2015-1135.html
This issue has been addressed in the following products: Red Hat Software Collections for Red Hat Enterprise Linux 7 Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUS Red Hat Software Collections for Red Hat Enterprise Linux 6 Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS Via RHSA-2015:1186 https://rhn.redhat.com/errata/RHSA-2015-1186.html
This issue has been addressed in the following products: Red Hat Software Collections for Red Hat Enterprise Linux 7 Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUS Red Hat Software Collections for Red Hat Enterprise Linux 6 Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS Via RHSA-2015:1187 https://rhn.redhat.com/errata/RHSA-2015-1187.html
This issue has been addressed in the following products: Red Hat Enterprise Linux 6 Via RHSA-2015:1218 https://rhn.redhat.com/errata/RHSA-2015-1218.html
This issue has been addressed in the following products: Red Hat Software Collections for Red Hat Enterprise Linux 7 Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUS Red Hat Software Collections for Red Hat Enterprise Linux 6 Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS Via RHSA-2015:1219 https://rhn.redhat.com/errata/RHSA-2015-1219.html
(In reply to Tomas Hoger from comment #5) > Upstream fix applied in versions 5.4.41, 5.5.25 and 5.6.9 was found to be > incomplete, still making it possible to trigger overflow on 32bit platforms: > > https://bugs.php.net/bug.php?id=69545#1431550655 A new CVE id CVE-2015-4643 was assigned to the incomplete fix issue, see bug 1234938. All PHP updates for Red Hat Enterprise Linux and Red Hat Software Collections that corrected this issue CVE-2015-4022 (see comment 13 to comment 17 above) included complete fix and hence also corrected CVE-2015-4643.