possible buffer overrun bug in command line client

Bug #410754 reported by Monty Taylor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Low
Andrew Hutchings

Bug Description

The following are from Domas. Note the bit "near 'r/*!40103" ... that r shouldn't be there. Looks like an off-by-one bug.

Also - we should document something like this as a good way to catalog things that we've removed.

flu:dr midom$ mysqldump --no-create-info --extended-insert=0 --skip-add-locks wikidb watchlist | drizzle -f wikidb
ERROR 1193 (HY000) at line 7: Unknown system variable 'CHARACTER_SET_CLIENT'
ERROR 1193 (HY000) at line 7: Unknown system variable 'CHARACTER_SET_RESULTS'
ERROR 1193 (HY000) at line 7: Unknown system variable 'COLLATION_CONNECTION'
ERROR 1193 (HY000) at line 7: Unknown system variable 'NAMES'
ERROR 1298 (HY000) at line 7: Unknown or incorrect time zone: '+00:00'
ERROR 1193 (HY000) at line 7: Unknown system variable 'SQL_MODE'
ERROR 1064 (42000) at line 22: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near 'r/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */' at line 1
ERROR 1193 (HY000) at line 22: Unknown system variable 'SQL_MODE'
ERROR 1193 (HY000) at line 22: Unknown system variable 'CHARACTER_SET_CLIENT'
ERROR 1193 (HY000) at line 22: Unknown system variable 'CHARACTER_SET_RESULTS'
ERROR 1193 (HY000) at line 22: Unknown system variable 'COLLATION_CONNECTION'
flu:dr midom$ mysqldump --no-create-info --extended-insert=0 --skip-add-locks wikidb watchlist | egrep -v NOTHINGNOTHINGNOTHING | drizzle -f wikidb
ERROR 1193 (HY000) at line 7: Unknown system variable 'CHARACTER_SET_CLIENT'
ERROR 1193 (HY000) at line 7: Unknown system variable 'CHARACTER_SET_RESULTS'
ERROR 1193 (HY000) at line 7: Unknown system variable 'COLLATION_CONNECTION'
ERROR 1193 (HY000) at line 7: Unknown system variable 'NAMES'
ERROR 1298 (HY000) at line 7: Unknown or incorrect time zone: '+00:00'
ERROR 1193 (HY000) at line 7: Unknown system variable 'SQL_MODE'
ERROR 1298 (HY000) at line 22: Unknown or incorrect time zone: 'SYSTEM'
ERROR 1193 (HY000) at line 22: Unknown system variable 'SQL_MODE'
ERROR 1193 (HY000) at line 22: Unknown system variable 'CHARACTER_SET_CLIENT'
ERROR 1193 (HY000) at line 22: Unknown system variable 'CHARACTER_SET_RESULTS'
ERROR 1193 (HY000) at line 22: Unknown system variable 'COLLATION_CONNECTION'

Revision history for this message
Jay Pipes (jaypipes) wrote :

I don't think this has to do with the command line client at all. I think this has only to do with the code that you changed, Monty, in sql_lex.cc which handles /*! comments in the parser, no?

Changed in drizzle:
assignee: nobody → Monty Taylor (mordred)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Monty Taylor (mordred) wrote : Re: [Bug 410754] Re: possible buffer overrun bug in command line client

Jay Pipes wrote:
> I don't think this has to do with the command line client at all. I
> think this has only to do with the code that you changed, Monty, in
> sql_lex.cc which handles /*! comments in the parser, no?

I don't think so ... look at the leading r in front of the comment...

> ** Changed in: drizzle
> Importance: Undecided => Low
>
> ** Changed in: drizzle
> Status: New => Confirmed
>
> ** Changed in: drizzle
> Assignee: (unassigned) => Monty Taylor (mordred)
>

Revision history for this message
Monty Taylor (mordred) wrote :

After having just fixed another buffer overrun bug in the command line client which was caused by sprintf into a statically sized buffer and browsing through the code, I think there are probably more than one of these. I'm going to give drizzle.cc a good going over.

Monty Taylor (mordred)
Changed in drizzle:
assignee: Monty Taylor (mordred) → Andrew Hutchings (linuxjedi)
Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Can no longer reproduce with current trunk. As a side note, please use drizzledump to retrieve data from MySQL servers as it will do on-the-fly conversions.

Changed in drizzle:
status: Confirmed → Fix Released
milestone: none → 2011-01-17
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.