MDEV-26015 ssl: remove insecure fixed DH params (mostly unused) - #5639
MDEV-26015 ssl: remove insecure fixed DH params (mostly unused)#5639xnox wants to merge 1 commit into
Conversation
|
@grooverdan @vuvova - please let me know if direct removal is appropriate; note that most OpenSSL are configured to use TLSv1.3/v1.2 with ECDHE and they simply ignore any DH set on the SSL context. However, with these calls still in place one cannot compile and use OpenSSL "no-dh" with a OPENSSL_NO_DH defined. If you want to keep this, I can add the HAVE_DH checks similar to how we used to have HAVE_DES checks in #3198 |
|
I'm pretty happy with this going into a latest MariaDB release. Even the openssl-1.0.1 of RHEL 7 supports ECDHE. Can you put a MDEV-26015 on the commit message title? @vuvova wdyt - for 11.4, the version that doesn't have a EOM RHEL7 /OpenSSL-1.0.1 builder, supporting checking OPENSSL_NO_DH, and replacing fixed DH with runtime DH_generate_parameters_ex? |
|
please add a direct quote to the commit comment. Something like and to be precise change "prohibited" to "discouraged" 😇 — it's "SHOULD NOT" and not "MUST NOT". If it succeeds in CI (on all builders, not only listed above) then it's ok. |
The quote you provide is about client certificates, those indeed are "should not" because if existing client cert exist; one has to accept it to for example rotate it. The code I am changing is server side to negotiate TLS_DH_ or TLS_DHE_ ciphers, all of which are "MUST NOT". I will update the PR description and the commit message. |
…aDB#5639 WolfSSL code path already operates without fixed DH parameters. OpenSSL code path still sets fixed static precomputed DH params, which is now prohibited by IETF. Also OPENSSL_init_ssl is not required since OpenSSL 1.1.0, for over 10 years now. Also cleaned up at the same time. https://www.rfc-editor.org/rfc/rfc10015.html#section-2: > Clients MUST NOT offer and servers MUST NOT select non-ephemeral FFDH cipher suites in (D)TLS 1.2 connections. https://www.rfc-editor.org/rfc/rfc10015.html#section-3: > Clients MUST NOT offer and servers MUST NOT select FFDHE cipher suites in (D)TLS 1.2 connections. And the depreciated tables include all ciphersuites that can use SSL_CTX_set_tmp_dh as part of the connection. Also for a very long time OpenSSL was handling these automatically anyway, back when DHE was still recommended.
a2d9440 to
ee682cb
Compare
RHEL 7.4 and up have ECDHE - https://access.redhat.com/articles/1462343 What systems do not have ECDHE? |
Thanks for references.
None that I'm aware of. But I'd rather not surprise them in a minor version upgrade. |
WolfSSL code path already operates without fixed DH parameters. OpenSSL code path still sets fixed static precomputed DH params, which is now prohibited by IETF.
Also OPENSSL_init_ssl is not required since OpenSSL 1.1.0, for over 10 years now. Also cleaned up at the same time.
https://www.rfc-editor.org/rfc/rfc10015.html#section-2:
https://www.rfc-editor.org/rfc/rfc10015.html#section-3:
And the depreciated tables include all ciphersuites that can use SSL_CTX_set_tmp_dh as part of the connection.
Also for a very long time OpenSSL was handling these automatically anyway, back when DHE was still recommended.