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

mariabackup SST with ssl-mode=VERIFY_CA/VERIFY_IDENTITY and no CA falls back to verify=0 (encrypted but unverified), unlike rsync SST

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Galera
    • None
    • Linux x86_64; MariaDB source `c894d97781b5`

    Description

      The rsync SST script rejects a configuration that requests certificate verification but provides no
      CA file or CA path:

      ```sh

      1. scripts/wsrep_sst_rsync.sh:240-248
        if [ "${SSLMODE#VERIFY}" != "$SSLMODE" ]; then
        ...
        if [ -z "$SSTCA$SSTCAP" ]; then
        wsrep_log_error "Can't have ssl-mode='$SSLMODE' without CA file or path"
        exit 22
        fi
        ```

      `wsrep_sst_mariabackup.sh` has no equivalent check. It validates the `ssl-mode` value
      (`:564-571`), forces `encrypt=3` when a certificate/key is present (`:582-594`) and aborts only when
      `ssl-mode != DISABLED` and `encrypt == 0` (`:610-618`). In `get_transfer()`, when `tcert`/`tcap` are
      empty the CA branch at `:408-433` is skipped and the code takes `:395-405`:
      `CN_option=""`, `tcmd="...,verify=0"` — i.e. the SST stream is encrypted but the peer certificate
      is not verified, even though `ssl-mode=VERIFY_CA/VERIFY_IDENTITY` was requested.

        1. Expected result

      `wsrep_sst_mariabackup` should reject (or at least fail closed with a clear error) the same
      configurations that `wsrep_sst_rsync` rejects: a `VERIFY_*` mode without a usable CA file/path must
      not silently downgrade to `verify=0`.

      Attachments

        Activity

          People

            seppo Seppo Jaakola
            csfuzz csfuzz
            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.