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

wsrep_sst_rsync.sh: apply safe() to joiner-supplied parameters

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • A parameter-injection gap existed in wsrep_sst_rsync because it failed to validate the joiner-supplied WSREP_SST_OPT_REMOTE_USER and WSREP_SST_OPT_REMOTE_PSWD values before interpolating them into the donor-written stunnel.conf and the rsync magic file.
    • Q2/2026 Replic. Development, Q3/2026 Replic. Maintenance

    Description

      Issue:
      wsrep_sst_rsync.sh interpolated WSREP_SST_OPT_REMOTE_USER and
      WSREP_SST_OPT_REMOTE_PSWD verbatim. Because both values originate from
      the joiner side of the SST request, a newline in either could splice
      an extra directive into the donor-written stunnel.conf (silently
      downgrading peer-cert verification) or an extra line into the rsync
      magic file. MDEV-39413 had introduced safe() for the same threat class
      in wsrep_sst_mariabackup but did not extend it to the rsync script.

      Solution:
      Routing the rsync interpolations through safe() closes the gap, and
      extending safe() to also reject tab and newline ensures multi-line
      values cannot survive into a config-file heredoc.

      Attachments

        Issue Links

          Activity

            People

              hemantdangi Hemant Dangi
              hemantdangi Hemant Dangi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.5d
                  0.5d

                  Git Integration

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