Bug 1315308 - php: Segmentation fault in mysql_driver.c
php: Segmentation fault in mysql_driver.c
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 1315309
Blocks: 1315348
  Show dependency treegraph
Reported: 2016-03-07 07:52 EST by Adam Mariš
Modified: 2016-06-13 13:49 EDT (History)
13 users (show)

See Also:
Fixed In Version: php 5.6.19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-06-13 13:49:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2016-03-07 07:52:53 EST
Segmentation fault in mysql_driver.c was found. When Z_TYPE is 0 (IS_NULL) then convert_to_string() returns value obtained from STR_EMPTY_ALLOC(). In turn, STR_EMPTY_ALLOC() returns a value of CG(interned_empty_string). Applying efree() on this value later causes crash. This issue was introduced by commit http://git.php.net/?p=php-src.git;a=commit;h=ef1bd8f0e6f88b1d123cea1c0b5079cfde7f90df

Upstream bug:


Upstream patch:

Comment 1 Adam Mariš 2016-03-07 07:54:05 EST
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1315309]
Comment 2 Remi Collet 2016-03-07 08:05:16 EST
Please explain how this is considered as a security issue, especially as it requires some crafted script.
Comment 3 Tomas Hoger 2016-06-13 13:49:49 EDT
Agree this is not a security issue.

Additionally, it was identified in the upstream bug that the problem was only introduced via a fix for the following upstream bug:


first used in PHP version 5.6.14.

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