Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-689

LP #1201033: Crash when using AES_ENCRYPT on empty string

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by Brian Franklin last update 07-10-2013 06:10:40

      Server crashes when trying to use AES_ENCRYPT on an empty string.

      1. uname -a
        Linux [hostname] 2.6.32-279.2.1.el6.x86_64 #1 SMP Fri Jul 20 01:55:29 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
      1. cat /etc/redhat-release
        CentOS release 6.3 (Final)

      Using Percona-Server-5.6.12-rc60.4-393.Linux.x86_64

      From mysqld.log:
      =================
      evp_enc.c(146): OpenSSL internal error, assertion failed: inl > 0
      01:13:15 UTC - mysqld got signal 6 ;
      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.
      Please help us make Percona Server better by reporting any
      bugs at http://bugs.percona.com/

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

      Thread pointer: 0xc78bdc0
      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 = 2b0e2fdef070 thread_stack 0x30000
      /usr/local/mysql-dev/bin/mysqld(my_print_stacktrace+0x35)[0x90e0d5]
      /usr/local/mysql-dev/bin/mysqld(handle_fatal_signal+0x3fb)[0x673b7b]
      /lib64/libpthread.so.0[0x384f20eca0]
      /lib64/libc.so.6(gsignal+0x35)[0x384ea302c5]
      /lib64/libc.so.6(abort+0x110)[0x384ea31d70]
      /lib64/libcrypto.so.6[0x38512d5f6f]
      /lib64/libcrypto.so.6(EVP_EncryptUpdate+0x1f8)[0x38512815c8]
      /usr/local/mysql-dev/bin/mysqld(my_aes_encrypt+0xc1)[0x91a9e1]
      /usr/local/mysql-dev/bin/mysqld(_ZN21Item_func_aes_encrypt7val_strEP6String+0xbd)[0x6268cd]
      /usr/local/mysql-dev/bin/mysqld(_ZN4Item4sendEP8ProtocolP6String+0x53)[0x59de03]
      /usr/local/mysql-dev/bin/mysqld(_ZN8Protocol19send_result_set_rowEP4ListI4ItemE+0x92)[0x66e962]
      /usr/local/mysql-dev/bin/mysqld(_ZN11select_send9send_dataER4ListI4ItemE+0x6c)[0x6b872c]
      /usr/local/mysql-dev/bin/mysqld(_ZN4JOIN4execEv+0x5c8)[0x6d05e8]
      /usr/local/mysql-dev/bin/mysqld[0x716539]
      /usr/local/mysql-dev/bin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_P10SQL_I_ListI8st_orderESB_S7_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xbc)[0x71686c]
      /usr/local/mysql-dev/bin/mysqld(_Z13handle_selectP3THDP13select_resultm+0x175)[0x716a75]
      /usr/local/mysql-dev/bin/mysqld[0x6f1609]
      /usr/local/mysql-dev/bin/mysqld(_Z21mysql_execute_commandP3THD+0x40ac)[0x6f6fac]
      /usr/local/mysql-dev/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x518)[0x6fa138]
      /usr/local/mysql-dev/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x837)[0x6fab07]
      /usr/local/mysql-dev/bin/mysqld(_Z10do_commandP3THD+0x117)[0x6fc007]
      /usr/local/mysql-dev/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x130)[0x6c5890]
      /usr/local/mysql-dev/bin/mysqld(handle_one_connection+0x45)[0x6c5995]
      /usr/local/mysql-dev/bin/mysqld(pfs_spawn_thread+0x13b)[0xb3fa0b]
      /lib64/libpthread.so.0[0x384f20683d]
      /lib64/libc.so.6(clone+0x6d)[0x384ead503d]

      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (c7b3f30): SELECT AES_ENCRYPT('','6b2d440b57b3bae74e3cf71e415b3965') FROM DUAL
      Connection ID (thread ID): 13
      Status: NOT_KILLED
      ==============================

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: