Bug 1088197 (CVE-2014-2440) - CVE-2014-2440 mysql: unspecified vulnerability related to Client (CPU April 2014)
Summary: CVE-2014-2440 mysql: unspecified vulnerability related to Client (CPU April 2...
Keywords:
Status: CLOSED DUPLICATE of bug 1054592
Alias: CVE-2014-2440
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1088232 1088234 1089202 1089203 1089209 1089366 1092145 1093372 1101062 1101063
Blocks: 1088219
TreeView+ depends on / blocked
 
Reported: 2014-04-16 08:36 UTC by Huzaifa S. Sidhpurwala
Modified: 2021-02-17 06:38 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-12 09:18:47 UTC
Embargoed:


Attachments (Terms of Use)
diff between 5.5.36 and 5.5.37 (1.61 KB, patch)
2014-05-08 08:43 UTC, Huzaifa S. Sidhpurwala
no flags Details | Diff
diff between 5.5.35 and 5.5.36 (1.93 KB, patch)
2014-05-08 09:46 UTC, Huzaifa S. Sidhpurwala
no flags Details | Diff
mysql upstream tarball diffs between 5.5.36 and 5.5.37 (1.58 KB, patch)
2014-05-12 04:24 UTC, Huzaifa S. Sidhpurwala
no flags Details | Diff
mariadb upstream tarball diffs between 5.5.36 and 5.5.37 (2.24 KB, patch)
2014-05-12 04:25 UTC, Huzaifa S. Sidhpurwala
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0522 0 normal SHIPPED_LIVE Moderate: mariadb55-mariadb security update 2014-05-20 15:11:10 UTC
Red Hat Product Errata RHSA-2014:0536 0 normal SHIPPED_LIVE Moderate: mysql55-mysql security update 2014-05-22 21:19:28 UTC
Red Hat Product Errata RHSA-2014:0537 0 normal SHIPPED_LIVE Moderate: mysql55-mysql security update 2014-05-22 21:09:11 UTC
Red Hat Product Errata RHSA-2014:0702 0 normal SHIPPED_LIVE Moderate: mariadb security update 2014-06-10 16:44:39 UTC

Description Huzaifa S. Sidhpurwala 2014-04-16 08:36:45 UTC
Vulnerability in the MySQL Client component of Oracle MySQL (subcomponent: Client). Supported versions that are affected are 5.5.36 and earlier and 5.6.16 and earlier. Very difficult to exploit vulnerability allows successful unauthenticated network attacks via multiple protocols. Successful attack of this vulnerability can result in unauthorized update, insert or delete access to some MySQL Client accessible data as well as read access to a subset of MySQL Client accessible data and ability to cause a partial denial of service (partial DOS) of MySQL Client. 

External References:

http://www.oracle.com/technetwork/topics/security/cpuapr2014-1972952.html#AppendixMSQL

Comment 1 Huzaifa S. Sidhpurwala 2014-04-16 09:50:56 UTC
Created mariadb tracking bugs for this issue:

Affects: fedora-all [bug 1088234]

Comment 2 Huzaifa S. Sidhpurwala 2014-04-16 09:51:04 UTC
Created community-mysql tracking bugs for this issue:

Affects: fedora-all [bug 1088232]

Comment 6 Fedora Update System 2014-04-29 05:23:26 UTC
mariadb-5.5.37-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2014-04-29 05:25:18 UTC
community-mysql-5.5.37-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 8 Fedora Update System 2014-04-29 05:26:56 UTC
mariadb-5.5.37-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 9 Fedora Update System 2014-04-29 05:28:47 UTC
community-mysql-5.5.37-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Huzaifa S. Sidhpurwala 2014-05-08 08:43:09 UTC
Created attachment 893579 [details]
diff between 5.5.36 and 5.5.37

Comment 11 Huzaifa S. Sidhpurwala 2014-05-08 09:46:07 UTC
Created attachment 893590 [details]
diff between 5.5.35 and 5.5.36

Comment 12 Huzaifa S. Sidhpurwala 2014-05-08 09:58:13 UTC
This issue corresponds to the following statement in the mysql-5.5.37 release notes at: http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-37.html

"While printing the server version, the mysql client did not check for buffer overflow in a string variable. (Bug #18186103)"

This matches the commit string:
"diff 7462 2014-02-12 12:13:19.0 Vamsikrishna Bhagi <vamsikrishna.bhagi> Bug #18186103	BUFFER OVERFLOW IN CLIENT"

from: 
http://code.metager.de/source/diff/mysql-server/client/mysql.cc?r2=/mysql-server/client/mysql.cc@7462&r1=/mysql-server/client/mysql.cc@7341

Looking at both the patches attached to this bug, it seems the actual issue was addressed in 5.5.36, where sprintf was replaced with snprintf (actually my_snprintf which is supposed to be a "Portable and limited vsnprintf() implementation"). Later in 5.5.37 the idea of using my_snprintf was scraped in favour of using the system glibc implementation.

In the version of mysql as shipped with Red Hat Enterprise Linux 6 (mysql-5.1), my_snprintf() is already used which is enough to mitigate the buffer overflow vulnerability. Therefore it is not affected by this flaw.

Comment 14 Tomas Hoger 2014-05-09 08:19:03 UTC
(In reply to Huzaifa S. Sidhpurwala from comment #12)
> "While printing the server version, the mysql client did not check for
> buffer overflow in a string variable. (Bug #18186103)"

That change is already know under different CVE - CVE-2014-0001, see bug 1054592.  If Oracle assigned CVE-2014-2440 is for the same issue, it is a duplicate assignment that should be rejected.

See bug 1054592 comment 23 for proper MySQL upstream commit link.

> In the version of mysql as shipped with Red Hat Enterprise Linux 6
> (mysql-5.1), my_snprintf() is already used which is enough to mitigate the
> buffer overflow vulnerability. Therefore it is not affected by this flaw.

CVE-2014-0001 was fixed in Red Hat Enterprise Linux 6 mysql packages via RHSA-2014:0164.

Comment 15 Tomas Hoger 2014-05-09 19:41:29 UTC
(In reply to Huzaifa S. Sidhpurwala from comment #12)
> Looking at both the patches attached to this bug, it seems the actual issue
> was addressed in 5.5.36, where sprintf was replaced with snprintf (actually
> my_snprintf which is supposed to be a "Portable and limited vsnprintf()
> implementation"). Later in 5.5.37 the idea of using my_snprintf was scraped
> in favour of using the system glibc implementation.

Diffs in comment 10 and comment 11 were between Red Hat shipped MySQL packages.  Red Hat MySQL 5.5.36 packages included additional patch for CVE-2014-0001 based on patch applied to MariaDB (see bug 1054592 comment 12), which replaced sprintf with my_snprintf.  MySQL upstream applied the fix in version 5.5.37 and used snprintf rather than MySQL specific my_snprintf to avoid buffer overflow (see bug 1054592 comment 23).

Comment 16 Huzaifa S. Sidhpurwala 2014-05-12 04:24:48 UTC
Created attachment 894542 [details]
mysql upstream tarball diffs between 5.5.36 and 5.5.37

Comment 17 Huzaifa S. Sidhpurwala 2014-05-12 04:25:57 UTC
Created attachment 894544 [details]
mariadb upstream tarball diffs between 5.5.36 and 5.5.37

Comment 18 Huzaifa S. Sidhpurwala 2014-05-12 04:28:16 UTC
Attached upstream tarball diffs between mysql 5.5.36 and 5.5.37 and mariadb 5.5.36 and 5.5.37.

mysql tarball diffs correspond to the issue fixed via CVE-2014-0001 (though in slightly different way). 

This actually leads me to believe that this CVE is a duplicate of CVE-2014-0001.

Comment 19 Fedora Update System 2014-05-16 10:09:46 UTC
mariadb-galera-5.5.37-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 errata-xmlrpc 2014-05-20 11:11:59 UTC
This issue has been addressed in following products:

  Red Hat Software Collections for RHEL-6

Via RHSA-2014:0522 https://rhn.redhat.com/errata/RHSA-2014-0522.html

Comment 22 Angelo Alvarez 2014-05-21 02:28:32 UTC
When will mysql55-mysql-5.5.36-2.el5 be patched for the vulnerabiltiy?

Comment 23 Tomas Hoger 2014-05-22 13:15:36 UTC
Comments above indicate that this CVE is likely to be duplicate of CVE-2014-0001, which was already fixed in mysql55-mysql (RHSA-2014:0186).

Comment 24 errata-xmlrpc 2014-05-22 17:12:40 UTC
This issue has been addressed in following products:

  Red Hat Software Collections for RHEL-6

Via RHSA-2014:0537 https://rhn.redhat.com/errata/RHSA-2014-0537.html

Comment 25 errata-xmlrpc 2014-05-22 17:23:06 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2014:0536 https://rhn.redhat.com/errata/RHSA-2014-0536.html

Comment 27 errata-xmlrpc 2014-06-10 12:45:14 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 7

Via RHSA-2014:0702 https://rhn.redhat.com/errata/RHSA-2014-0702.html

Comment 28 Huzaifa S. Sidhpurwala 2014-07-01 05:59:58 UTC
This flaw is a duplicate of CVE-2014-0001. It was addressed in Red Hat Enterprise Linux 5 via RHSA-2014:0186 (mysql55-mysql)

Comment 30 Tomas Hoger 2014-09-12 09:18:22 UTC
Oracle has confirmed that this CVE really is a duplicate of CVE-2014-0001, as was speculated in the comments above:

http://seclists.org/oss-sec/2014/q3/579

The CPU page is now updated to note this information:

http://www.oracle.com/technetwork/topics/security/cpuapr2014-1972952.html#AppendixMSQL

The following is used as a note for CVE-2014-2440:

  CVE-2014-2440 is equivalent to CVE-2014-0001.

Comment 31 Tomas Hoger 2014-09-12 09:18:47 UTC

*** This bug has been marked as a duplicate of bug 1054592 ***

Comment 33 Doran Moppert 2020-02-10 04:28:11 UTC
Statement:

This flaw was found to be a duplicate of CVE-2014-0001. Please see https://access.redhat.com/security/cve/CVE-2014-0001 for information about affected products and security errata.


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