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 1351168 - (CVE-2016-5768) CVE-2016-5768 php: Double free in _php_mb_regex_ereg_replace_exec
CVE-2016-5768 php: Double free in _php_mb_regex_ereg_replace_exec
Status: NEW
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=20160623,reported=2...
: Security
Depends On: 1351180 1356812
Blocks: 1323912 1351183
  Show dependency treegraph
 
Reported: 2016-06-29 07:49 EDT by Andrej Nemec
Modified: 2018-06-29 18:12 EDT (History)
12 users (show)

See Also:
Fixed In Version: php 5.5.37, php 5.6.23
Doc Type: If docs needed, set a value
Doc Text:
A double free flaw was found in the mb_ereg_replace_callback() function of php which is used to perform regex search. This flaw could possibly cause a PHP application to crash.
Story Points: ---
Clone Of:
Environment:
Last Closed:
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-2016:2598 normal SHIPPED_LIVE Moderate: php security and bug fix update 2016-11-03 08:12:00 EDT
Red Hat Product Errata RHSA-2016:2750 normal SHIPPED_LIVE Moderate: rh-php56 security, bug fix, and enhancement update 2016-11-15 11:40:02 EST

  None (edit)
Description Andrej Nemec 2016-06-29 07:49:33 EDT
The _php_mb_regex_ereg_replace_exec when called by mb_ereg_replace_callback frees the description twice in case when callback execution failed (i.e. threw an exception).

Upstream bug:

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

Upstream patch:

http://git.php.net/?p=php-src.git;a=commitdiff;h=5b597a2e5b28e2d5a52fc1be13f425f08f47cb62

CVE assignment:

http://seclists.org/oss-sec/2016/q2/589
Comment 1 Andrej Nemec 2016-06-29 08:05:05 EDT
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1351180]
Comment 2 Fedora Update System 2016-07-02 11:27:23 EDT
php-5.6.23-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 3 Fedora Update System 2016-07-02 15:22:11 EDT
php-5.6.23-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 4 Fedora Update System 2016-07-02 15:27:30 EDT
php-5.6.23-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 5 Huzaifa S. Sidhpurwala 2016-07-14 03:39:21 EDT
Analysis:

mb_ereg_replace_callback() is used to perform a regex search, the matched text is them replaced by output of the callback function. Script authors need to provide the callback function as the input to the function. In case the callback execution fails, (Most likely when the script author did not provide a proper callback), then a double-free takes places, causing php application crash.
Comment 7 errata-xmlrpc 2016-11-03 17:05:27 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:2598 https://rhn.redhat.com/errata/RHSA-2016-2598.html
Comment 9 errata-xmlrpc 2016-11-15 06:41:37 EST
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2016:2750 https://rhn.redhat.com/errata/RHSA-2016-2750.html

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