Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3, 13.1
-
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.
-
- 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.