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

Read after free at Binlog_crypt_data::load_latest_binlog_key()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Pending Release
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.7, Not 5.5, Not 5.6
    • Fix Version/s: 5.7.23-23
    • Component/s: None

      Description

      Numerous encryption testcases fail under Valgrind, e.g.

      binlog_encryption.binlog_write_error 'mix' w6 [ fail ]  Found warnings/errors in server log file!
              Test ended at 2018-06-27 06:47:39
      line
      ==75== Invalid read of size 1
      ==75==    at 0x4C33579: __strncmp_sse42 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==75==    by 0x1904559: Binlog_crypt_data::load_latest_binlog_key() (binlog_crypt_data.cc:102)
      ==75==    by 0x18DC986: MYSQL_BIN_LOG::open_binlog(char const*, char const*, unsigned long, bool, bool, bool, Format_description_log_event*) (binlog.cc:5221)
      ==75==    by 0xECC1AE: init_server_components() (mysqld.cc:4605)
      ==75==    by 0xECD0BB: mysqld_main(int, char**) (mysqld.cc:5124)
      ==75==    by 0xEC35A9: main (main.cc:25)
      ==75==  Address 0xf6a24b0 is 0 bytes inside a block of size 4 free'd
      ==75==    at 0x1989169: my_free (my_malloc.c:132)
      ==75==    by 0x1904541: Binlog_crypt_data::load_latest_binlog_key() (binlog_crypt_data.cc:101)
      ==75==    by 0x18DC986: MYSQL_BIN_LOG::open_binlog(char const*, char const*, unsigned long, bool, bool, bool, Format_description_log_event*) (binlog.cc:5221)
      ==75==    by 0xECC1AE: init_server_components() (mysqld.cc:4605)
      ==75==    by 0xECD0BB: mysqld_main(int, char**) (mysqld.cc:5124)
      ==75==    by 0xEC35A9: main (main.cc:25)
      ==75==  Block was alloc'd at
      ==75==    at 0x1988E0A: my_malloc (my_malloc.c:62)
      ==75==    by 0x19894FE: my_strdup (my_malloc.c:309)
      ==75==    by 0xD2B1FD9: mysql_key_fetch(boost::movelib::unique_ptr<keyring::IKey, boost::movelib::default_delete<keyring::IKey> >, char**, void**, unsigned long*) (keyring_impl.cc:161)
      ==75==    by 0xD2B40F4: char mysql_key_fetch<keyring::Key>(char const*, char**, char const*, void**, unsigned long*, char const*) (keyring.h:81)
      ==75==    by 0xD2B35FD: mysql_key_fetch(char const*, char**, char const*, void**, unsigned long*) (keyring.cc:147)
      ==75==    by 0x17B1F7A: key_fetch(THD*, st_plugin_int**, void*) (keyring_service.cc:49)
      ==75==    by 0x1635FF7: plugin_foreach_with_mask(THD*, char (**)(THD*, st_plugin_int**, void*), int, unsigned int, void*) (sql_plugin.cc:2552)
      ==75==    by 0x16360C2: plugin_foreach_with_mask(THD*, char (*)(THD*, st_plugin_int**, void*), int, unsigned int, void*) (sql_plugin.cc:2567)
      ==75==    by 0x17B21E5: my_key_fetch (keyring_service.cc:117)
      ==75==    by 0x190450E: Binlog_crypt_data::load_latest_binlog_key() (binlog_crypt_data.cc:96)
      ==75==    by 0x18DC986: MYSQL_BIN_LOG::open_binlog(char const*, char const*, unsigned long, bool, bool, bool, Format_description_log_event*) (binlog.cc:5221)
      ==75==    by 0xECC1AE: init_server_components() (mysqld.cc:4605)
      ==75==    by 0xECD0BB: mysqld_main(int, char**) (mysqld.cc:5124)
      ==75==    by 0xEC35A9: main (main.cc:25)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                robert.golebiowski Robert Golebiowski
                Reporter:
                laurynas.biveinis Laurynas Biveinis
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: