It was reported [1] that a null pointer dereference is possible in 'pgsql' PHP extension, when running pg_insert() with a NULL table-name. Upstream commit with the fix: http://git.php.net/?p=php-src.git;a=commit;h=124fb22a13fafa3648e4e15b4f207c7096d8155e [1]: https://bugs.php.net/bug.php?id=68741
Created php tracking bugs for this issue: Affects: fedora-all [bug 1185897]
Notice about this issue: If the (remote) user can change the SQL request to send a NULL table-name, the system have much more serious issues that this segfault.
This issue was introduced via this bug / commit: https://bugs.php.net/bug.php?id=62978 http://git.php.net/?p=php-src.git;a=commitdiff;h=f718684a6c1d6221015031d1e72d3eb55ecbb659 in upstream PHP versions 5.4.20 and 5.5.2. Therefore, this did not affect PHP packages as shipped with Red Hat Enterprise Linux 5, 6 and 7. Statement: This issue did not affect the versions of PHP as shipped with Red Hat Enterprise Linux 5, 6 and 7.
Upstream bug report indicates that this can be triggered with pg_insert() with NULL table name. In addition to pg_insert(), build_tablename() is also called by pg_update(), pg_select() and pg_delete(). In all cases, code ensures that table name is not NULL. However, php_strtok_r() can also return NULL if string only consists of delimiter characters (in this case, if table name only contains dots). As noted in comment 2, table name is unlikely to come from untrusted source, and if it is, the PHP application likely has bigger issues. Therefore, this has minimal impact.
php-5.6.8-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.8-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.24-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
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 6 Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS Red Hat Software Collections for Red Hat Enterprise Linux 6.5 EUS Via RHSA-2015:1053 https://rhn.redhat.com/errata/RHSA-2015-1053.html