Bug 1315308 - php: Segmentation fault in mysql_driver.c
Summary: php: Segmentation fault in mysql_driver.c
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1315309
Blocks: 1315348
TreeView+ depends on / blocked
 
Reported: 2016-03-07 12:52 UTC by Adam Mariš
Modified: 2019-12-16 05:29 UTC (History)
13 users (show)

Fixed In Version: php 5.6.19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-13 17:49:49 UTC


Attachments (Terms of Use)

Description Adam Mariš 2016-03-07 12:52:53 UTC
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:

https://bugs.php.net/bug.php?id=71569

Upstream patch:

http://git.php.net/?p=php-src.git;a=commit;h=bc419fee5c9704eb4ce338acacbc2380c6f4427d

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

Affects: fedora-all [bug 1315309]

Comment 2 Remi Collet 2016-03-07 13:05:16 UTC
Please explain how this is considered as a security issue, especially as it requires some crafted script.

Comment 3 Tomas Hoger 2016-06-13 17:49:49 UTC
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:

https://bugs.php.net/bug.php?id=70389

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.