Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22133

handle_fatal_signal (sig=11) on optimized builds in handle_grant_table instead of ERROR | Buffer overflow (on optimized builds)

    XMLWordPrintable

Details

    Description

      RENAME TABLE mysql.procs_priv TO mysql.procs_gone;
      CREATE USER a@localhost;
      

      Leads to:

      10.5.3 e8351934b68d6d3ee273292eaa2ece203bb2b846

      Core was generated by `/data/MD020420-mariadb-10.5.3-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x7f5543691700 (LWP 13792))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055ff22880d47 in my_write_core (sig=sig@entry=11) at /data/10.5_opt/mysys/stacktrace.c:518
      #2  0x000055ff2224287a in handle_fatal_signal (sig=11) at /data/10.5_opt/sql/signal_handler.cc:325
      #3  <signal handler called>
      #4  handle_grant_table (thd=0x7f5515c12018, grant_table=..., which_table=PROCS_PRIV_TABLE, drop=false, user_from=0x7f5515c470d8, user_to=0x0) at /data/10.5_opt/sql/sql_acl.cc:9895
      #5  0x000055ff21fce319 in handle_grant_data (thd=thd@entry=0x7f5515c12018, tables=..., drop=drop@entry=false, user_from=user_from@entry=0x7f5515c470d8, user_to=0x0) at /data/10.5_opt/sql/sql_acl.cc:10464
      #6  0x000055ff21fd168c in mysql_create_user (thd=thd@entry=0x7f5515c12018, list=..., handle_as_role=false) at /data/10.5_opt/sql/sql_acl.cc:10680
      #7  0x000055ff2204df10 in mysql_execute_command (thd=thd@entry=0x7f5515c12018) at /data/10.5_opt/sql/sql_parse.cc:5247
      #8  0x000055ff22054a6c in mysql_parse (thd=thd@entry=0x7f5515c12018, rawbuf=<optimized out>, length=23, parser_state=parser_state@entry=0x7f55436904d0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/10.5_opt/sql/sql_parse.cc:7953
      #9  0x000055ff220498e0 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f5515c12018, packet=packet@entry=0x7f5515c3a019 "CREATE USER a@localhost", packet_length=packet_length@entry=23, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/10.5_opt/sql/sql_parse.cc:1839
      #10 0x000055ff22047bff in do_command (thd=0x7f5515c12018) at /data/10.5_opt/sql/sql_parse.cc:1358
      #11 0x000055ff2213c92e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f55410329b8, put_in_cache=put_in_cache@entry=true) at /data/10.5_opt/sql/sql_connect.cc:1422
      #12 0x000055ff2213cad4 in handle_one_connection (arg=arg@entry=0x7f55410329b8) at /data/10.5_opt/sql/sql_connect.cc:1319
      #13 0x000055ff224a89da in pfs_spawn_thread (arg=0x7f554104b018) at /data/10.5_opt/storage/perfschema/pfs.cc:2201
      #14 0x00007f5542ab86db in start_thread (arg=0x7f5543691700) at pthread_create.c:463
      #15 0x00007f5541eb688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt), 10.5.3 (dbg), 10.5.3 (opt)

      Bug confirmed not present in:

      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Output of MySQL 5.6.47;

      5.6.47>RENAME TABLE mysql.procs_priv TO mysql.procs_gone;
      Query OK, 0 rows affected (0.00 sec)
      5.6.47>CREATE USER a@localhost;
      ERROR 1146 (42S02): Table 'mysql.procs_priv' doesn't exist
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.