Bug #5056
closedCFEngine tries to use the SSL_CTX_clear_options OpenSSL function that do not exist in old OpenSSL versions
Description
During some builds on SLES 10, I get:
CCLD cf-agent /root/core-3.6rc2-build1/libpromises/.libs/libpromises.so: undefined reference to `SSL_CTX_clear_options' collect2: ld returned 1 exit status
The reason is that SSL_CTX_clear_options was introduced first in OpenSSL 0.9.8m, whereas SLES 10 use 0.9.8a: https://www.openssl.org/docs/ssl/SSL_CTX_set_options.html (bottom)
According to this page, this function can be used to disable things like legacy renegotiation support ( SSL_OP_LEGACY_SERVER_CONNECT and SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION ), which seems confirmed by the comment in CFEngine source code:
/* Clear all flags, we do not want compatibility tradeoffs like * SSL_OP_LEGACY_SERVER_CONNECT. */ SSL_CTX_clear_options(ssl_ctx, SSL_CTX_get_options(ssl_ctx));
This problem should be first reported to CFEngine, then dealt with.
The OpenSSL documentation states:
If the option SSL_OP_LEGACY_SERVER_CONNECT or SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION is set then initial connections and renegotiation between patched OpenSSL clients and unpatched servers succeeds. If neither option is set then initial connections to unpatched servers will fail. The option SSL_OP_LEGACY_SERVER_CONNECT is currently set by default even though it has security implications: otherwise it would be impossible to connect to unpatched servers (i.e. all of them initially) and this is clearly not acceptable. Renegotiation is permitted because this does not add any additional security issues: during an attack clients do not see any renegotiations anyway. As more servers become patched the option SSL_OP_LEGACY_SERVER_CONNECT will not be set by default in a future version of OpenSSL. OpenSSL client applications wishing to ensure they can connect to unpatched servers should always set SSL_OP_LEGACY_SERVER_CONNECT OpenSSL client applications that want to ensure they can not connect to unpatched servers (and thus avoid any security issues) should always clear SSL_OP_LEGACY_SERVER_CONNECT using SSL_CTX_clear_options() or SSL_clear_options(). The difference between the SSL_OP_LEGACY_SERVER_CONNECT and SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION options is that SSL_OP_LEGACY_SERVER_CONNECT enables initial connections and secure renegotiation between OpenSSL clients and unpatched servers only, while SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION allows initial connections and renegotiation between OpenSSL and unpatched clients or servers.
It means that using CFEngine default implementation, it is not possible to disable selectively this SSL_CTX_clear_options function as it would mean that if a client would be to meet an unpatched server, the connection would never happen ("If neither option is set then initial connections to unpatched servers will fail. ").
The OS we support are in the following case:- SLES 10 and SLES 11 do not support this (OpenSSL 0.9.8a and 0.9.8h respectively)
- Debian 6+, RHEL6+ and Ubuntu Precise (12.04+) support this, older versions do not
- Disable this function in our packages (enable compatibility flags again, allowing clients without secure renegociation support to connect/compile
- Provide our own OpenSSL just like with LMDB (I feel this would be highly unmaintainable)
- Do not support older OSes (Erm... I think quite a lot of people would not agree ^^")
For me, solution one is the most adequate: we provide a slightly less hardened cf-agent/cf-serverd (just like in 3.5) to allow the use of old OSes. I require a thorough review of this ticket, this change is hightly impacting and should be decided with care...
Updated by Jonathan CLARKE over 10 years ago
Did you open a ticket about this with CFEngine?
Updated by Matthieu CERDA over 10 years ago
CFEngine bug tracker issue: https://dev.cfengine.com/issues/6109
Updated by Matthieu CERDA over 10 years ago
- Status changed from Discussion to Pending technical review
- % Done changed from 0 to 100
- Pull Request set to https://github.com/Normation/rudder-packages/pull/385
PR ready, with the patch given to CFEngine !
Updated by Matthieu CERDA over 10 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset commit:9fd4b4ecbdde95ebad18c542aa6316f2420a0053.
Updated by Jonathan CLARKE over 10 years ago
Applied in changeset commit:e331eda81f8f273c6778610faff465af04f70312.
Updated by Vincent MEMBRÉ over 10 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.11.0~beta2 (announcement , changelog), which were released today.
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging
- Parent task deleted (
#5077)