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

@@debug_dbug and @@debug_sync accept null bytes

    XMLWordPrintable

Details

    • Unexpected results

    Description

      --source include/have_debug.inc
      SET @saved_dbug= @@GLOBAL.debug_dbug;
      SET       @@GLOBAL.debug_dbug= 'd,A\0C';
      SELECT    @@GLOBAL.debug_dbug , #=> Expected: d,A␀C. Actual: d,A
        LENGTHB(@@GLOBAL.debug_dbug); #=> Expected: 5. Actual: 3
      SET @@GLOBAL.debug_dbug= @saved_dbug;
       
      --source include/have_debug_sync.inc
      SET       @@SESSION.debug_sync= 'now SIGNAL A\0C';
      SELECT    @@SESSION.debug_sync , #=> Expected: … A␀C. Actual: … A
        LENGTHB(@@SESSION.debug_sync); #=> Expected: 27. Actual: 24
      SET @@SESSION.debug_sync= RESET;
      

      This is very reminiscent of MDEV-40271; though unlike @@default_master_connection, @@debug_dbug and @@debug_sync are set up in the C/C++ code with null-terminated string names, so these variables should not accept null bytes at all.
      I have not determined whether they will read uninitialized buffer regions, as in MDEV-40271.

      Attachments

        Issue Links

          Activity

            People

              ParadoxV5 Jimmy Hú
              ParadoxV5 Jimmy Hú
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.