Bug 8391 - Our OpenSSL is out of date
Summary: Our OpenSSL is out of date
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.18.0
Assignee: Adam Halim
URL:
Keywords: ossman_tester, prosaic
Depends on:
Blocks:
 
Reported: 2024-07-19 16:27 CEST by Samuel Mannehed
Modified: 2024-08-01 16:23 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:
MUST: * OpenSSL included in ThinLinc should not have any known security issues affecting ThinLinc users SHOULD: * The latest stable OpenSSL should be included in ThinLinc


Attachments

Description Samuel Mannehed cendio 2024-07-19 16:27:52 CEST
We currently have OpenSSL 3.2.0 in our build system. The latest stable version is 3.3.1, and there have been some security fixes since our last upgrade. Some of those fixes might be relevant for us:

https://www.openssl.org/news/cl33.txt
https://www.openssl.org/news/vulnerabilities.html
Comment 1 Adam Halim cendio 2024-07-26 13:51:05 CEST
The following CVE's have been fixed between 3.2.0 and 3.3.1:

* 3.2.0 -> 3.2.1
  - CVE-2024-0727
  - CVE-2023-6237
  - CVE-2023-6129
* 3.2.1 -> 3.2.2
  - CVE-2024-2511
* 3.2 -> 3.3.0
  - None
* 3.3.0 -> 3.3.1
  - CVE-2024-4741
  - CVE-2024-4603
Comment 2 Adam Halim cendio 2024-07-26 14:04:09 CEST
* CVE-2024-0727
   Can potentially lead to a crash if an application reads a malformed PKCS12
   file.
* CVE-2023-6237
   Only affects the function EVP_PKEY_public_check(), which we don't use.
* CVE-2023-6129
   Only affects PowerPC.
* CVE-2024-2511
   Only affects servers, not clients.
* CVE-2024-4741
   Only affects the function SSL_free_buffers(), which we don't use.
* CVE-2024-4603
   Only affects the functions EVP_PKEY_public_check() and
   EVP_PKEY_param_check(), which we don't use.
  
Overall, only CVE-2024-0727 affects our client, and is very low severity.
Comment 3 Adam Halim cendio 2024-07-26 15:35:06 CEST
(In reply to Adam Halim from comment #2)
> * CVE-2024-2511
>    Only affects servers, not clients.
To add to this, the bug happens only if the SSL_OP_NO_TICKET option is used with TLSv1.3. We don't use this option. The bug can force a DoS, either by a malicious client, or by accidentally under normal operation.
Comment 4 Adam Halim cendio 2024-07-26 17:29:57 CEST
Building 3.3.1 fails on win32 due to the following error:
> /rpmbuild/BUILD/openssl-3.3.1/crypto/threads_win.c:199: undefined reference to `InterlockedAdd64'

There seems to have been some effort made not to call InterlockedAdd64 on 32 bit windows systems [1], but the patches in [1] aren't part of the 3.3.1 release. Still, I tried building the master branch in Cenbuild to see if the patches work, and indeed I was able to build the package successfully (with some additional patching to detect MinGW).

[1] https://github.com/openssl/openssl/pull/24405
Comment 6 Adam Halim cendio 2024-07-29 14:40:39 CEST
OpenSSL has now been upgraded to 3.3.1. I backported the patch from [1] (only this PR, not the other 2). This did not merge cleanly, and I had to do this by hand.

The patch only affects win32, so we should test that platform extra carefully.

I also added a patch to detect 32 bit MinGW and have made a PR [2]. Hopefully, both of these patches can be removed next time we upgrade OpenSSL.

[1] https://github.com/openssl/openssl/pull/24405
[2] https://github.com/openssl/openssl/pull/25025
Comment 7 Adam Halim cendio 2024-07-29 16:42:41 CEST
I was able to successfully build the client-bundle, and tested connecting with a win32 client, and a Linux client on Fedora 39 without any issue. We should probably wait with more extensive tests until OpenSSH (bug 8389) has been upgraded as well.
> MUST:
>  ✅  OpenSSL included in ThinLinc should not have any known security issues
>      affecting ThinLinc users
There is still one known security issue in 3.3.1:
* CVE-2024-5355
    Affects function SSL_select_next_proto(), which we don't use.
> SHOULD:
>  * The latest stable OpenSSL should be included in ThinLinc
Indeed, we have the latest stable release.
Comment 9 Adam Halim cendio 2024-07-31 16:10:08 CEST
Regarding CVE-2024-0727, it only affects a couple of functions, where the affected function PKCS12_parse() is used by OpenSC to read a key from a file and store it on the card, which we never do. This is not something we do.
Comment 10 Pierre Ossman cendio 2024-08-01 16:23:08 CEST
Tested ssh on all platforms on bug 8389.

Tested smart card authentication from Fedora 39. No issues.

Patches look good.

> MUST:
> 
>  * OpenSSL included in ThinLinc should not have any known security issues affecting ThinLinc users

We are using the latest version, so we should have all fixes. One CVE was issued after that, but was commented on above.

> SHOULD:
> 
>  * The latest stable OpenSSL should be included in ThinLinc

Indeed we do, 3.3.1.

Note You need to log in before you can comment on or make changes to this bug.