Bug #28361 | Buffer overflow in DECIMAL code on Windows | ||
---|---|---|---|
Submitted: | 10 May 2007 16:41 | Modified: | 10 Jun 2007 18:30 |
Reporter: | Mark Matthews | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.1+, 5.0 | OS: | Windows (XP/2003) |
Assigned to: | Alexey Botchkov | CPU Architecture: | Any |
[10 May 2007 16:41]
Mark Matthews
[10 May 2007 17:32]
Mark Matthews
Just checked, this is an issue in 5.1.18 (from the to-be-released builds from the engineering team) as well.
[11 May 2007 16:58]
Jess Balint
To trigger this bug, the following statement should be sent: update Decimal_Tab set NULL_VAL= 0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875; The smallest string to cause stack corruption is: 0.000000000100000000000000003643219731549774157916554706559963960899 Starting in: Field_new_decimal::store_value()->dbug_decimal_as_string()->decimal2string() Looks to be somewhere in decimal2string() that its overwritten (strings/decimal.c)
[20 May 2007 14:12]
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/27046 ChangeSet@1.2491, 2007-05-20 18:12:30+05:00, holyfoot@mysql.com +3 -0 bug #28361 Buffer overflow in DECIMAL code on Windows my_decimal in a good occasion can contain more decimal digits than is officially supported (DECIMAL_MAX_PRECISION), so we need to prepare bigger buffer for the resulting string.
[20 May 2007 17:23]
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/27050 ChangeSet@1.2491, 2007-05-20 21:22:57+05:00, holyfoot@mysql.com +3 -0 bug #28361 Buffer overflow in DECIMAL code on Windows my_decimal in some cases can contain more decimal digits than is officially supported (DECIMAL_MAX_PRECISION), so we need to prepare bigger buffer for the resulting string.
[21 May 2007 9:02]
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/27060 ChangeSet@1.2492, 2007-05-21 13:02:03+05:00, holyfoot@mysql.com +5 -0 Bug #28361 Buffer overflow in DECIMAL code on Windows result max length changed for the 'decimal' fields so test results have to be fixed
[26 May 2007 10:17]
Joerg Bruehe
A copy of the 5.1 version of this fix is included in the sources used to build 5.1.19-beta.
[4 Jun 2007 21:21]
Bugs System
Pushed into 5.1.20-beta
[4 Jun 2007 21:23]
Bugs System
Pushed into 5.0.44
[10 Jun 2007 18:30]
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 fix in 5.0.44 and 5.1.19 changelogs.