Bug 1991500
| Summary: | mysql: Port to OpenSSL 3.0 [FIPS] | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Honza Horak <hhorak> |
| Component: | mysql | Assignee: | Michal Schorm <mschorm> |
| Status: | CLOSED WONTFIX | QA Contact: | Jakub Heger <jheger> |
| Severity: | unspecified | Docs Contact: | Lenka Špačková <lkuprova> |
| Priority: | unspecified | ||
| Version: | 9.0 | CC: | databases-maint, hhorak, jafiala, jheger, lkuprova, mschorm, pkubat, zmiklank |
| Target Milestone: | beta | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Known Issue | |
| Doc Text: |
.The `--ssl-fips-mode` option in `MySQL` and `MariaDB` does not change FIPS mode
The `--ssl-fips-mode` option in `MySQL` and `MariaDB` in RHEL works differently than in upstream.
In RHEL 9, if you use `--ssl-fips-mode` as an argument for the `mysqld` or `mariadbd` daemon, or if you use `ssl-fips-mode` in the `MySQL` or `MariaDB` server configuration files, `--ssl-fips-mode` does not change FIPS mode for these database servers.
Instead:
* If you set `--ssl-fips-mode` to `ON`, the `mysqld` or `mariadbd` server daemon does not start.
* If you set `--ssl-fips-mode` to `OFF` on a FIPS-enabled system, the `mysqld` or `mariadbd` server daemons still run in FIPS mode.
This is expected because FIPS mode should be enabled or disabled for the whole RHEL system, not for specific components.
Therefore, do not use the `--ssl-fips-mode` option in `MySQL` or `MariaDB` in RHEL. Instead, ensure FIPS mode is enabled on the whole RHEL system:
* Preferably, install RHEL with FIPS mode enabled. Enabling FIPS mode during the installation ensures that the system generates all keys with FIPS-approved algorithms and continuous monitoring tests in place. For information about installing RHEL in FIPS mode, see link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/security_hardening/assembly_installing-the-system-in-fips-mode_security-hardening[Installing the system in FIPS mode].
* Alternatively, you can switch FIPS mode for the entire RHEL system by following the procedure in link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening#switching-the-system-to-fips-mode_using-the-system-wide-cryptographic-policies[Switching the system to FIPS mode].
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-02-09 07:27:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1958021 | ||
|
Description
Honza Horak
2021-08-09 09:53:24 UTC
The current behavior in RHEL-9, no matter whether FIPS is ON or OFF for the whole system, is this: #> service mysqld start Redirecting to /bin/systemctl start mysqld.service Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xeu mysqld.service" for details. And /var/log/mysql/mysqld.log includes several errors like this: 2022-03-30T17:00:03.926463Z 0 [ERROR] [MY-011272] [Server] SSL fips mode error: error:00000000:lib(0)::reason(0) 2022-03-30T17:00:03.926495Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it. 2022-03-30T17:00:03.927199Z 0 [ERROR] [MY-010119] [Server] Aborting The comment above should also include the information that the behavior is seen after putting "ssl-fips-mode=ON" to the /etc/my.cnf.d/mysql-server.cnf file. (In reply to Honza Horak from comment #8) > The current behavior in RHEL-9, no matter whether FIPS is ON or OFF for the > whole system, is this: > > #> service mysqld start > Redirecting to /bin/systemctl start mysqld.service > Job for mysqld.service failed because the control process exited with error > code. > See "systemctl status mysqld.service" and "journalctl -xeu mysqld.service" > for details. > > And /var/log/mysql/mysqld.log includes several errors like this: > > 2022-03-30T17:00:03.926463Z 0 [ERROR] [MY-011272] [Server] SSL fips mode > error: error:00000000:lib(0)::reason(0) > 2022-03-30T17:00:03.926495Z 0 [ERROR] [MY-013236] [Server] The designated > data directory /var/lib/mysql/ is unusable. You can remove all files that > the server added to it. > 2022-03-30T17:00:03.927199Z 0 [ERROR] [MY-010119] [Server] Aborting Another finding: On FIPS enabled system, when I put "ssl-fips-mode=OFF", it allows the MySQL daemon to start. It's not clear to me whether the FIPS is enforced in that case. (In reply to Honza Horak from comment #10) > Another finding: > On FIPS enabled system, when I put "ssl-fips-mode=OFF", it allows the MySQL > daemon to start. It's not clear to me whether the FIPS is enforced in that > case. Confirmed that the FIPS is still enabled even if "ssl-fips-mode=OFF" is explicitly put into the config file (OFF is actually a default, so putting it explicitly to the config file does not change the configuration value actually): On FIPS-enabled machine: [root@kvm-01-guest26 ~]# echo "SHOW SESSION STATUS LIKE 'Ssl_cipher_list';"|mysql -u root -h 127.0.0.1 Variable_name Value Ssl_cipher_list TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA While on non-FIPS machine I get a larger cipher list (not sure how else I could verify that the mysqld daemon is in the FIPS mode or not): [root@s390x-kvm-063 newcerts]# echo "SHOW SESSION STATUS LIKE 'Ssl_cipher_list';"|mysql -u root -h 127.0.0.1 Variable_name Value Ssl_cipher_list TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-DSS-AES128-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES256-SHA:CAMELLIA256-SHA:CAMELLIA128-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA I've put some short text into the Doc Text, but rather inclusing more verbose description that might be needed: The option --ssl-fips-mode is not encouraged to use in RHEL. FIPS mode is enabled on the whole system and the MySQL and MariaDB database services follow that setting. However, when the server is started with --ssl-fips-mode option set, the daemon does not behave as documented in the upstream documentation for this configuration option. When --ssl-fips-mode is used as an argument for mysqld or used in the MySQL or MariaDB server configuration and set to ON, the daemon does not start. When --ssl-fips-mode is used as an argument for mysqld or used in the MySQL or MariaDB server configuration on a machine with FIPS mode endabled and this configuration option is set to OFF, the daemon does not turn off the FIPS mode for the daemon. Instead, the daemon still runs in the FIPS mode. After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. |