Bug #27036 | show create table <federated> crashes server | ||
---|---|---|---|
Submitted: | 11 Mar 2007 18:57 | Modified: | 31 Mar 2007 23:14 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Federated storage engine | Severity: | S1 (Critical) |
Version: | 5.1.17BK | OS: | Any (*) |
Assigned to: | Antony Curtis | CPU Architecture: | Any |
Tags: | crash, federated |
[11 Mar 2007 18:57]
Shane Bester
[11 Mar 2007 19:00]
MySQL Verification Team
full error log from 5.1.17BK
Attachment: bug27036_error_log_5.1.17bk.txt (text/plain), 2.96 KiB.
[11 Mar 2007 20:20]
MySQL Verification Team
stack trace from windows debug 5.1.17BK
Attachment: bug27036_5.1.17_windows_debug_stack.txt (text/plain), 3.83 KiB.
[15 Mar 2007 11:56]
Antony Curtis
Doesn't appear to be reproducable after applying patch for Bug#26257 I will compare by building from unpatched tree to verify.
[16 Mar 2007 0:01]
Antony Curtis
Bug is caused by buffer overflow currupting the data structures used to manage the heap. The amount of memory allocated at ha_federated.cc:1416 is too small. if (!(share= (FEDERATED_SHARE *) my_multi_malloc(MYF(MY_WME), &share, sizeof(*share), &select_query, query.length()+table->s->connect_string.length+1, NullS))) goto error; The query string later has the table name and a closing quotation mark appended to it, which is not taken into account - so an adequately long table name will result in catastrophic crash. In any case, any patch to this will be obsoleted by the patch in Bug#26257 as it uses a very different mechanism for allocating memory.
[25 Mar 2007 4:13]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/22885 ChangeSet@1.2491, 2007-03-24 20:13:13-07:00, acurtis@xiphis.org +2 -0 Bug#27036 "show create table <federated> crashes server" Buffer allocated for string was inadequate in the case where table name length is longer than the connection name length. This bug fix is obsoleted by the patch for Bug 26257
[30 Mar 2007 18:12]
Antony Curtis
Patch for Bug#26257 which was pushed into 5.1.18-beta fixed this bug
[31 Mar 2007 23:14]
Paul DuBois
Noted in 5.1.18 changelog. For FEDERATED tables, SHOW CREATE TABLE could fail when the table name was longer than the connection name.