Bug #28558 | UpdateXML called with garbage crashes server | ||
---|---|---|---|
Submitted: | 21 May 2007 10:19 | Modified: | 2 Jun 2007 14:29 |
Reporter: | Alexander Barkov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: XML functions | Severity: | S3 (Non-critical) |
Version: | 5.1 | OS: | Any |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
[21 May 2007 10:19]
Alexander Barkov
[21 May 2007 12:47]
MySQL Verification Team
the fix can be tested with this testcase which submits random blob arguments to the updatexml function.
Attachment: bug28558.c (text/plain), 6.05 KiB.
[23 May 2007 7:07]
Alexander Barkov
Memory corruption happens in the code generating error message. An easier query demonstrating the same problem. select UpdateXML('<a>a</a>',repeat('b b',1000),'');
[23 May 2007 7:40]
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/27184 ChangeSet@1.2580, 2007-05-23 12:34:47+05:00, bar@mysql.com +3 -0 Bug#28558 UpdateXML called with garbage crashes server Problem: Memory overrun happened in attempts to generate error messages (e.g. in case of incorrect XPath syntax). Reason: set_if_bigger() was used instead of set_if_smaller(). Change: replacing wrong set_if_bigger() to set_if_smaller(), and making minor additional code clean-ups.
[23 May 2007 8:10]
Sergey Vojtovich
ok to push.
[23 May 2007 8:19]
Alexander Barkov
Pushed into 5.1.18-rpl
[1 Jun 2007 19:24]
Bugs System
Pushed into 5.1.20-beta
[2 Jun 2007 14:29]
Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html Documented bugfix in 5.1.20 changelog.