[MXS-4181] MaxScale w/SSL doesn't work on FIPS RHEL7 Created: 2022-06-30 Updated: 2022-07-05 Resolved: 2022-07-05 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 6.4.0 |
| Fix Version/s: | 2.5.21, 6.4.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Brad Viviano | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
RHEL7 |
||
| Description |
|
A 512bit length RSA key is not FIPS compliant. In MaxScale 6.4.0 and earlier, inside ./server/core/ssl.cc the following code block
Will always cause an error like the following if SSL is enabled in MaxScale on a RHEL/CentOS7 FIPS system w/OpenSSL 1.0.1:
It is easy to confirm that on a RHEL7 based system with FIPS enabled,
for 512bit length will always fail:
This is not an issue on RHEL8 systems w/OpenSSL 1.1.1 and
If I am missing something someplace in the guide that lets me override the keylength value in
please let me know. Thanks. |
| Comments |
| Comment by markus makela [ 2022-06-30 ] |
|
Looking at the OpenSSL 1.1.1 documentation, the SSL_CTX_set_tmp_rsa function has been removed. The code in 1.1.1 also only works with them as they are empty defines. The OpenSSL changelog shows that ephemeral RSA key exchanges were removed due to them being too weak which means we should be able to just remove the code in question. |
| Comment by markus makela [ 2022-07-04 ] |
|
We can also turn on the automatic ECDH mode for OpenSSL 1.0.2 which should allow more secure ciphers to be used. bviviano can you build MaxScale from source to verify that the fix works? So far our tests show that just removing the code in question and then enabling the automatic ECDH mode fixes the problem and prevents use of weak ephemeral RSA keys. |
| Comment by Brad Viviano [ 2022-07-05 ] |
|
> Brad Viviano can you build MaxScale from source to verify that the fix works? Happy to test, but will need to get dependencies setup (cmake, etc) as the RH provided ones are too old to compile MaxScale from source, unless you have a bin tar.gz with the fix in it you can point me at to download. Otherwise, let me know what tag/release/etc I need to pull that has the fix in it. |
| Comment by markus makela [ 2022-07-05 ] |
|
The fix will be included in the next 2.5 and 6.4 releases. |