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

SHOW PROCESSLIST reference to THD::db not protected against simultaneous updates

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.1, 5.5.30, 5.1.67, 5.2.14, 5.3.12
    • Fix Version/s: 10.0.4, 5.5.32
    • Component/s: None
    • Labels:
      None

      Description

      SHOW PROCESSLIST accesses the current db (THD::db) of each thread without
      any protection against simultaneous update (by THD::set_db()).

              if ((thd_info->db=tmp->db))             // Safe test
                thd_info->db=thd->strdup(thd_info->db);

      This can result in reading free()d memory, in theory returning sensitive data
      or even crashing (if free() decided to munmap() the memory).

      A possible solution is to protect THD::set_db() calls, as well as reading of
      THD::db from SHOW PROCESSLIST, by the LOCK_thd_data mutex.

        Attachments

          Activity

            People

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              knielsen Kristian Nielsen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: