Bug #31081 | server crash in regexp function | ||
---|---|---|---|
Submitted: | 18 Sep 2007 14:15 | Modified: | 3 Dec 2007 17:50 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: General | Severity: | S1 (Critical) |
Version: | 5.0.48-enterprise, 5.1.23BK | OS: | Any |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
Tags: | bfsm_2007_10_18 |
[18 Sep 2007 14:15]
Shane Bester
[21 Sep 2007 10:05]
Gleb Shchepa
The problem is in the incomplete code in the ctype_uca.c file: all of the ucs2_latvian_ci, ucs2_swedish_ci etc collations have NULL value in the CHARSET_INFO::ctype field instead of a pointer to a valid ctype array. Also there is no such array.
[27 Sep 2007 23:08]
Jeffrey Pugh
Is this possibly related to 31159?
[1 Oct 2007 12:15]
Alexander Barkov
A simplified test which demonstrates the same crash: drop table if exists t1; create table t1 (col001 set('a') charset ucs2 collate ucs2_latvian_ci); insert into t1 values (); select * from t1 where col001 regexp pi();
[1 Oct 2007 14:05]
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/34716 ChangeSet@1.2534, 2007-10-01 19:01:51+05:00, bar@mysql.com +11 -0 Bug#31081 server crash in regexp function Problem: The "regex" library written by Henry Spencer does not support tricky character sets like UCS2. Fix: convert tricky character sets to UTF8 before calling regex functions.
[5 Oct 2007 7:18]
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/34950 ChangeSet@1.2534, 2007-10-05 12:15:11+05:00, bar@mysql.com +11 -0 Bug#31081 server crash in regexp function Problem: The "regex" library written by Henry Spencer does not support tricky character sets like UCS2. Fix: convert tricky character sets to UTF8 before calling regex functions.
[16 Oct 2007 10:29]
Alexander Barkov
Pushed into 5.0.55-rpl Pushed into 5.1.23-rpl
[24 Oct 2007 7:09]
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/36229 ChangeSet@1.2543, 2007-10-24 12:08:33+05:00, bar@mysql.com +1 -0 Bug#31081 server crash in regexp function Additional fix for valgrind warning
[27 Nov 2007 10:49]
Bugs System
Pushed into 5.0.54
[27 Nov 2007 10:50]
Bugs System
Pushed into 5.1.23-rc
[27 Nov 2007 10:52]
Bugs System
Pushed into 6.0.4-alpha
[3 Dec 2007 17:50]
Paul DuBois
Noted in 5.0.54, 5.1.23, 6.0.4 changelogs. REGEXP operations could cause a server crash for character sets such as ucs2. Now the arguments are converted to utf8 if possible, to allow correct results to be produced if the resulting string contains only 8-bit characters.