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

Length of Password for replication and upgrade

Details

    Description

      I set up replication, with this password : (10.7.4)

      ePE5A0jpBrpyzDRILDGeuh5L9IoUCbDE1wgLWe4xCJg=
      

      Everything working fine, after i decided to upgrade to 10.7.7

      apt update
      apt upgrade
      

      then the password become :

      ePE5A0jpBrpyzDRILDGeuh5L9IoUCbDE1wgLWe4xC
      

      (in master.info), look the password is now truncated.

      Attachments

        Activity

          Aurelien_LEQUOY Aurélien LEQUOY created issue -
          Aurelien_LEQUOY Aurélien LEQUOY made changes -
          Field Original Value New Value
          Description I set up replication, with this password : (10.7.4)


          {code:java}
          ePE5A0jpBrpyzDRILDGeuh5L9IoUCbDE1wgLWe4xCJg=
          {code}


          Everything working fine, after i decided to upgrade to 10.7.7

          then the password become :

          {code:java}
          ePE5A0jpBrpyzDRILDGeuh5L9IoUCbDE1wgLWe4xC
          {code}

          (in master.info), look the password is now truncated.
          I set up replication, with this password : (10.7.4)


          {code:java}
          ePE5A0jpBrpyzDRILDGeuh5L9IoUCbDE1wgLWe4xCJg=
          {code}


          Everything working fine, after i decided to upgrade to 10.7.7

          {code:java}
          apt update
          apt upgrade
          {code}

          then the password become :

          {code:java}
          ePE5A0jpBrpyzDRILDGeuh5L9IoUCbDE1wgLWe4xC
          {code}

          (in master.info), look the password is now truncated.
          serg Sergei Golubchik made changes -
          Assignee Tuukka Pasanen [ JIRAUSER49166 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.7 [ 24805 ]
          illuusio Tuukka Pasanen added a comment - - edited

          Thank you for report and could you fill which Debian version. So I can try to replicate this easier.

          illuusio Tuukka Pasanen added a comment - - edited Thank you for report and could you fill which Debian version. So I can try to replicate this easier.
          illuusio Tuukka Pasanen added a comment - - edited

          Please provide Debian/Ubuntu version was in use

          illuusio Tuukka Pasanen added a comment - - edited Please provide Debian/Ubuntu version was in use
          illuusio Tuukka Pasanen made changes -
          Status Open [ 1 ] Needs Feedback [ 10501 ]
          TheLinuxJedi Andrew Hutchings (Inactive) made changes -
          Assignee Tuukka Pasanen [ JIRAUSER49166 ] Andrew Hutchings [ JIRAUSER52179 ]

          Hi,

          In https://mariadb.com/kb/en/change-master-to/ it mentions "The maximum length of the MASTER_PASSWORD string is 32 characters.".

          In this case the file will have been read by MariaDB Server and truncated at that point (the read segment only reads around 41 characters). Then the truncated version will have been written out when the file was updated.

          Please for now use a smaller password and please feel free to open a feature request to support longer passwords.

          TheLinuxJedi Andrew Hutchings (Inactive) added a comment - Hi, In https://mariadb.com/kb/en/change-master-to/ it mentions "The maximum length of the MASTER_PASSWORD string is 32 characters.". In this case the file will have been read by MariaDB Server and truncated at that point (the read segment only reads around 41 characters). Then the truncated version will have been written out when the file was updated. Please for now use a smaller password and please feel free to open a feature request to support longer passwords.
          TheLinuxJedi Andrew Hutchings (Inactive) made changes -
          Status Needs Feedback [ 10501 ] Open [ 1 ]
          TheLinuxJedi Andrew Hutchings (Inactive) made changes -
          Component/s N/A [ 14411 ]
          Fix Version/s N/A [ 14700 ]
          Fix Version/s 10.7 [ 24805 ]
          Resolution Not a Bug [ 6 ]
          Status Open [ 1 ] Closed [ 6 ]

          the exact version :

          No LSB modules are available.
          Distributor ID:	Debian
          Description:	Debian GNU/Linux 11 (bullseye)
          Release:	11
          Codename:	bullseye
          uname -a
          Linux gcp-prod-oos-sql-0001-mariadb-g01-001 5.10.0-19-cloud-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux
          

          Aurelien_LEQUOY Aurélien LEQUOY added a comment - the exact version : No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye uname -a Linux gcp-prod-oos-sql- 0001 -mariadb-g01- 001 5.10 . 0 - 19 -cloud-amd64 # 1 SMP Debian 5.10 . 149 - 2 ( 2022 - 10 - 21 ) x86_64 GNU/Linux

          dmidecode -s system-product-name
          Google Compute Engine
          

          Aurelien_LEQUOY Aurélien LEQUOY added a comment - dmidecode -s system-product-name Google Compute Engine
          markus makela markus makela added a comment - - edited

          The problem appears to be on line 500 in rpl_mi.cc:

                  init_strvar_from_file(mi->password, SCRAMBLED_PASSWORD_CHAR_LENGTH+1,
                                        &mi->file, 0) ||
          

          SCRAMBLED_PASSWORD_CHAR_LENGTH+1 expands to 20 * 2 + 1 which would be OK if the password was stored in its hashed form but since it's in plaintext form, the length should be 96 to allow 32 character passwords in multi-byte character sets to be used (MDEV-4013 seems to have added support for them).

          markus makela markus makela added a comment - - edited The problem appears to be on line 500 in rpl_mi.cc : init_strvar_from_file(mi->password, SCRAMBLED_PASSWORD_CHAR_LENGTH+1, &mi->file, 0) || SCRAMBLED_PASSWORD_CHAR_LENGTH+1 expands to 20 * 2 + 1 which would be OK if the password was stored in its hashed form but since it's in plaintext form, the length should be 96 to allow 32 character passwords in multi-byte character sets to be used ( MDEV-4013 seems to have added support for them).
          petko.vasilev Petko Vasilev (Inactive) made changes -

          we should return an error when we set a password more than 32 no ?

          Aurelien_LEQUOY Aurélien LEQUOY added a comment - we should return an error when we set a password more than 32 no ?
          serg Sergei Golubchik made changes -
          Assignee Andrew Hutchings [ JIRAUSER52179 ] Andrei Elkin [ elkin ]
          Resolution Not a Bug [ 6 ]
          Status Closed [ 6 ] Stalled [ 10000 ]
          serg Sergei Golubchik made changes -
          Fix Version/s N/A [ 14700 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.7 [ 24805 ]
          Fix Version/s 10.8 [ 26121 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          serg Sergei Golubchik made changes -
          Component/s Replication [ 10100 ]
          Component/s N/A [ 14411 ]
          serg Sergei Golubchik made changes -
          Priority Critical [ 2 ] Minor [ 4 ]
          serg Sergei Golubchik made changes -
          Labels beginner-friendly
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.7 [ 24805 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.8 [ 26121 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.11 [ 27614 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]

          People

            Elkin Andrei Elkin
            Aurelien_LEQUOY Aurélien LEQUOY
            Votes:
            0 Vote for this issue
            Watchers:
            7 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.