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

encrypt-binlog / encrypt-tmp-files silently write plaintext when the key-management plugin returns ENCRYPTION_KEY_NOT_ENCRYPTED (version 0)

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11, 11.4, 11.8, 12.3, 13.1
    • 10.11, 11.4, 11.8, 12.3, 13.1
    • Encryption
    • None
    • source HEAD `c894d97781b5` (13.2.0-alpha)

    Description

      `ENCRYPTION_KEY_NOT_ENCRYPTED` (value 0) is handled as "success without encryption" instead of an
      error:

      • `sql/mf_iocache_encr.cc:266` — when the key-management plugin reports version 0, the encryption
        hooks are left unset and the function returns success.
      • `sql/log.cc:4641` — consequently `Start_encryption_log_event` is not written and the log write
        path returns success.
      • `sql/mysqld.cc:5821` — the startup check that should reject the configuration accepts this state.

      So a server started with `-encrypt-binlog=ON` (and/or `-encrypt-tmp-files=ON`) can end up writing
      plaintext when the configured key-management plugin returns version 0, with no error and no
      indication in the log that encryption was silently skipped.

        1. Expected result

      `encrypt-binlog`/`encrypt-tmp-files` must fail closed: if encryption is requested and the provider
      reports that it cannot encrypt (`ENCRYPTION_KEY_NOT_ENCRYPTED`), startup (or the affected log write)
      must abort with a clear error rather than continue in plaintext.

      Attachments

        Activity

          People

            bnestere Brandon Nesterenko
            csfuzz csfuzz
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.