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

server crashes when trying to decrypt a key using asymmetric_decrypt UDF

Details

    • Yes

    Description

      The server crashes with the below assertion:

      mysqld: /home/mohit.joshi/PS-7044/extra/opensslpp/src/opensslpp/core_error.cpp:37: static void opensslpp::core_error::raise_with_error_string(const string&): Assertion `err != 0' failed.
      17:33:12 UTC - mysqld got signal 6 ;

      Refer to the steps below to reproduce the crash:

      Step 1: Start MySQL server
      Step 2: Install component file://component_encryption_udf
      Step 3:
      
      mysql> SET @algo = 'RSA';
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> SET @key_len = 1024;
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> SET @priv = create_asymmetric_priv_key(@algo, @key_len);
      Query OK, 0 rows affected (0.02 sec)
      
      mysql> SET @pub = create_asymmetric_pub_key(@algo, @priv);
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> SET @ciphertext = asymmetric_encrypt(@algo, 'My secret text', @priv);
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> select asymmetric_decrypt(@algo, '0x5E9620C7FCA05D714642CACC16DC9DA59D7CD7B04DD535571EE5C49F753FA3DF80B0B7955F06F0263221A81256D6D6DB3CDEECF0D7813F6DD50BE6F45AB5B9094E3D24C06FD3C2E98B8C97AB53B9994BCC2754AA46D9214555CC33470084554A32933DDE53E5C855935281A2ED2BBE1D38966CB62D39C7FB4B3B1A64C872C9E5', @pub);
      
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      No connection. Trying to reconnect...
      ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql_22000.sock' (111)
      ERROR:
      Can't connect to the server

      Attachments

        Issue Links

          Activity

            People

              yura.sorokin Yura Sorokin
              mohit.joshi Mohit Joshi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 6 hours
                  6h

                  Smart Checklist