Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1185904 - (CVE-2015-1352) CVE-2015-1352 php: NULL pointer dereference in pgsql extension
CVE-2015-1352 php: NULL pointer dereference in pgsql extension
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20150104,reported=2...
: Security
Depends On: 1185897 1209880 1209884 1209887 1228056 1228057 1228058 1228059 1228060 1228061
Blocks: 1185412
  Show dependency treegraph
 
Reported: 2015-01-26 10:25 EST by Vasyl Kaigorodov
Modified: 2015-06-05 06:43 EDT (History)
19 users (show)

See Also:
Fixed In Version: php 5.4.40, php 5.5.24, php 5.6.8
Doc Type: Bug Fix
Doc Text:
A NULL pointer dereference flaw was found in PHP's pgsql extension. A specially crafted table name passed to a function such as pg_insert() or pg_select() could cause a PHP application to crash.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-06-04 04:13:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1053 normal SHIPPED_LIVE Moderate: php55 security and bug fix update 2015-06-04 08:06:06 EDT

  None (edit)
Description Vasyl Kaigorodov 2015-01-26 10:25:05 EST
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
Comment 1 Vasyl Kaigorodov 2015-01-26 10:27:03 EST
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1185897]
Comment 2 Remi Collet 2015-04-02 10:07:06 EDT
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.
Comment 3 Tomas Hoger 2015-04-08 07:27:26 EDT
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.
Comment 4 Tomas Hoger 2015-04-08 07:33:09 EDT
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.
Comment 8 Fedora Update System 2015-04-22 18:51:45 EDT
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.
Comment 9 Fedora Update System 2015-04-23 12:10:58 EDT
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.
Comment 10 Fedora Update System 2015-04-27 04:39:26 EDT
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.
Comment 15 errata-xmlrpc 2015-06-04 04:07:01 EDT
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

Note You need to log in before you can comment on or make changes to this bug.