Bug 640845 (CVE-2010-3836)

Summary: CVE-2010-3836 MySQL: pre-evaluating LIKE arguments in view prepare mode causes crash (MySQL Bug#54568)
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: byte, jlieskov, kvolny, tgl
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 15:20:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 645642, 645643, 645647, 645651, 652553, 652554, 833943    
Bug Blocks:    
Attachments:
Description Flags
upstream patch none

Description Vincent Danen 2010-10-06 21:31:43 UTC
A flaw in MySQL versions prior to 5.1.51 [1] was reported [2] that could allow an authenticated user to kill connections to MySQL.  Upstream describes the problem as follows:

IN quantified predicates are never executed directly. They are rather wrapped inside nodes called IN Optimizers (Item_in_optimizer) which take care of the execution. However, this is not done during view preparation. Unfortunately the LIKE predicate pre-evaluates constant right-hand side arguments even during name resolution within view preparation. Likely this is meant as an optimization.

There is a patch for this available [3].

[1] http://dev.mysql.com/doc/refman/5.1/en/news-5-1-51.html
[2] http://bugs.mysql.com/bug.php?id=54568
[3] http://lists.mysql.com/commits/112602

Comment 3 Vincent Danen 2010-10-12 20:15:15 UTC
This issue has been assigned the name CVE-2010-3836:

http://article.gmane.org/gmane.comp.security.oss.general/3627

Comment 4 Huzaifa S. Sidhpurwala 2010-10-14 09:20:04 UTC
Created attachment 453415 [details]
upstream patch

Comment 6 Tom Lane 2010-10-17 02:03:54 UTC
It appears that the patch that actually went in for this is not the first one linked to in the bugzilla entry, but rather
http://lists.mysql.com/commits/115062

Comment 12 Huzaifa S. Sidhpurwala 2010-10-21 14:44:46 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 mysql package, as shipped with Red Hat
Enterprise Linux 5 and 6.

--

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

Comment 15 Huzaifa S. Sidhpurwala 2010-10-22 06:29:12 UTC
Created mysql tracking bugs for this issue

Affects: fedora-12 [bug 645647]

Comment 16 Huzaifa S. Sidhpurwala 2010-10-22 06:42:29 UTC
Created mysql tracking bugs for this issue

Affects: fedora-13 [bug 645651]

Comment 18 errata-xmlrpc 2010-11-03 20:21:43 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 20 errata-xmlrpc 2011-01-18 18:42:48 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