MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
unknown dc91bc74c7 BUG#31793 (log event corruption causes crash):
When running mysqlbinlog on a 64-bit machine with a corrupt relay log,
it causes mysqlbinlog to crash. In this case, the crash is caused
because a request for 18446744073709534806U bytes is issued, which
apparantly can be served on a 64-bit machine (speculatively, I assume)
but this causes the memcpy() issued later to copy the data to segfault.

The request for the number of bytes is caused by a computation
of data_len - server_vars_len where server_vars_len is corrupt in such
a sense that it is > data_len. This causes a wrap-around, with the
the data_len given above.

This patch adds a check that if server_vars_len is greater than
data_len before the substraction, and aborts reading the event in
that case marking the event as invalid. It also adds checks to see
that reading the server variables does not go outside the bounds
of the available space, giving a limited amount of integrity check.


mysql-test/r/mysqlbinlog.result:
  Result change.
mysql-test/t/mysqlbinlog.test:
  Adding test that it fails gracefully for a corrupt relay log.
sql/log_event.cc:
  Adding check that status var length does not cause wrap-around
  when performing subtraction. Extending get_str_len_and_pointer() to
  check that the string can actually be read without reading outside
  bounds. Adding checks when reading server variables from the Query-
  log_event so that the variable can really be read. Abort reading
  and mark the event as invalid otherwise.
mysql-test/std_data/corrupt-relay-bin.000624:
  BitKeeper file /home/mats/devel/b31793-mysql-5.0-rpl/mysql-test/std_data/corrupt-relay-bin.000624
2007-11-09 13:43:09 +01:00
bdb Revert previous attempt to fix bug#27693, the files removed from the 2007-09-22 16:29:15 +02:00
BitKeeper Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build 2007-06-18 20:15:27 +02:00
BUILD Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl 2007-10-31 09:06:08 +01:00
client Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0 2007-10-30 12:21:44 +04:00
cmd-line-utils Generate "config.h" directly into the "include" directory, later copied 2007-07-30 21:09:45 +02:00
config/ac-macros Fix for bug #31254: "Max_data_length" truncated / reported wrong 2007-10-12 14:03:51 +04:00
dbug CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
Docs Merge mysql.com:/home/kent/bk/tmp/mysql-4.1-build 2007-03-22 19:43:41 +01:00
extra Merge pilot.mysql.com:/data/msvensson/mysql/bug27789/my50-bug27789 2007-10-05 19:56:25 +02:00
heap Merge anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-engines 2007-10-19 13:04:30 -07:00
include Merge mysql.com:/home/gluh/MySQL/Merge/5.0 2007-10-23 18:51:43 +05:00
innobase NULL MERGE this ChangeSet to 5.1 2007-08-15 17:20:54 -06:00
libmysql Merge mysql.com:/home/gluh/MySQL/Merge/5.0 2007-10-23 18:51:43 +05:00
libmysql_r my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
libmysqld Merge trift2.:/MySQL/M41/push-4.1 2007-06-18 19:44:58 +02:00
man my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myisam Merge mysql.com:/home/gluh/MySQL/Merge/5.0 2007-10-23 18:51:43 +05:00
myisammrg BUG#26976 - Missing table in merge not noted in related error msg + 2007-06-06 04:42:41 +05:00
mysql-test BUG#31793 (log event corruption causes crash): 2007-11-09 13:43:09 +01:00
mysys Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base 2007-10-18 16:39:55 -06:00
ndb Merge ramayana.hindu.god:/home/tsmith/m/bk/50 2007-10-10 14:12:36 -06:00
netware Change URLs. 2007-10-05 13:16:54 -04:00
os2 Avoid the name conflict between the system-provided "md5.h" and the MySQL one 2007-07-19 14:14:03 +02:00
pstack my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
regex my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
scripts Merge ramayana.hindu.god:/home/tsmith/m/bk/50 2007-10-10 14:12:36 -06:00
server-tools Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2007-09-15 04:45:20 +02:00
sql BUG#31793 (log event corruption causes crash): 2007-11-09 13:43:09 +01:00
sql-bench my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql-common Bug#30951: makedate returns different results depending on version of mysql 2007-10-12 11:46:48 +02:00
SSL SSL/Makefile.am mysql-test/Makefile.am: 2007-07-27 17:39:07 +02:00
strings Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0 2007-10-30 12:21:44 +04:00
support-files Removing 7 year old 3.23 crufty debian dir that is not in use, so as not to cause confusion. 2007-10-12 13:07:39 -07:00
tests Merge mysql.com:/home/gluh/MySQL/Merge/5.0 2007-10-23 18:51:43 +05:00
tools Avoid the name conflict between the system-provided "md5.h" and the MySQL one 2007-07-19 14:14:03 +02:00
VC++Files Merge trift2.:/MySQL/M41/clone-4.1 2007-06-18 19:16:12 +02:00
vio Bug#28812 rpl_ssl fails due to assert in extra/yassl/src/socket_wrapper.cpp:117 2007-08-28 11:34:43 +02:00
win Merge ramayana.hindu.god:/home/tsmith/m/bk/50 2007-09-28 10:54:49 -06:00
zlib CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
.bzrignore Bug #30596 GROUP BY optimization gives wrong result order 2007-08-27 17:33:41 +02:00
.cvsignore
CMakeLists.txt CMakeLists.txt: 2007-08-04 00:26:46 +02:00
configure.in Removed debian dir. It was a mistake to embed it in the tree in the first place. 2007-10-12 02:15:32 -07:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
EXCEPTIONS-CLIENT EXCEPTIONS-CLIENT: 2007-03-14 18:28:16 +01:00
Makefile.am Removed debian dir. It was a mistake to embed it in the tree in the first place. 2007-10-12 02:15:32 -07:00
README make_binary_distribution.sh: 2006-11-07 22:26:37 +01:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file and
  the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installing and Upgrading chapter.
- For the new features/bugfix history, see the Change History appendix.
- For the currently known bugs/misfeatures (known errors) see the Problems
  and Common Errors appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.