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

heap-buffer-overflow in main.percona_utility_user

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 8.0.16-7
    • Fix Version/s: 8.0.17-8
    • Component/s: None
    • Labels:

      Description

      Build Percona Server with "-DWITH_ASAN=ON -DWITH_ASAN_SCOPE=ON".
      Run

      ./mtr --debug-server --sanitize main.percona_utility_user
      
      ==36830==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61200031d860 at pc 0x7fe0fd53ce1d bp 0x7fe0d106a230 sp 0x7fe0d10699d8
      READ of size 257 at 0x61200031d860 thread T45
          #0 0x7fe0fd53ce1c  (/usr/lib/x86_64-linux-gnu/libasan.so.5.0.0+0x66e1c)
          #1 0x55d5f46ac1bf in strdup_root(MEM_ROOT*, char const*) /mnt/hgfs/repos/percona-server/mysys/my_alloc.cc:248
          #2 0x55d5f46ac1e3 in safe_strdup_root(MEM_ROOT*, char const*) /mnt/hgfs/repos/percona-server/mysys/my_alloc.cc:252
          #3 0x55d5f2a0f7ca in ACL_USER::copy(MEM_ROOT*) /mnt/hgfs/repos/percona-server/sql/auth/sql_auth_cache.cc:343
          #4 0x55d5f29fd3bf in find_mpvio_user /mnt/hgfs/repos/percona-server/sql/auth/sql_authentication.cc:1778
          #5 0x55d5f29ff656 in parse_client_handshake_packet /mnt/hgfs/repos/percona-server/sql/auth/sql_authentication.cc:2651
          #6 0x55d5f2a00559 in server_mpvio_read_packet /mnt/hgfs/repos/percona-server/sql/auth/sql_authentication.cc:2870
          #7 0x55d5f2b1ee3c in caching_sha2_password_authenticate /mnt/hgfs/repos/percona-server/sql/auth/sha2_password.cc:977
          #8 0x55d5f29f69f9 in do_auth_once /mnt/hgfs/repos/percona-server/sql/auth/sql_authentication.cc:2915
          #9 0x55d5f2a014fd in acl_authenticate(THD*, enum_server_command) /mnt/hgfs/repos/percona-server/sql/auth/sql_authentication.cc:3200
          #10 0x55d5f24ba11f in check_connection /mnt/hgfs/repos/percona-server/sql/sql_connect.cc:932
          #11 0x55d5f24be70e in login_connection /mnt/hgfs/repos/percona-server/sql/sql_connect.cc:987
          #12 0x55d5f24be966 in thd_prepare_connection(THD*) /mnt/hgfs/repos/percona-server/sql/sql_connect.cc:1141
          #13 0x55d5f2926276 in handle_connection /mnt/hgfs/repos/percona-server/sql/conn_handler/connection_handler_per_thread.cc:304
          #14 0x55d5f514c6bf in pfs_spawn_thread /mnt/hgfs/repos/percona-server/storage/perfschema/pfs.cc:2855
          #15 0x7fe0fd476181 in start_thread /build/glibc-KRRWSm/glibc-2.29/nptl/pthread_create.c:486
          #16 0x7fe0fc339b1e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11db1e)
      

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                zsolt.parragi Zsolt Parragi
                Reporter:
                yura.sorokin Yura Sorokin
              • 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 - 1 hour
                  1h