openssl: Segfault in OpenSSL 3.5.0 on Windows when using the Windows cert store
The application is Fossil (https://fossil-scm.org/). Everything works with all versions of OpenSSL prior to 3.5.0, and on Unix with 3.5.0. But on Windows using 3.5.0, I get a segfault in bio_lib.c:98 when trying to start a TLS connection after earlier calling SSL_CTX_load_verify_store(). If I omit the call to SSL_CTX_load_verify_store(), everything appears to work.
In bio_lib.c:98, the method point is not NULL, but nor is it a valid pointer.
Repro steps:
- Download Fossil source code tarball from https://fossil-scm.org/home/uv/download.html
- Use the instructions at https://fossil-scm.org/home/wiki?name=Release+Build+How-To to build for Win64 or Win32. Executive summary:
- Put a static build of OpenSSL in a directory named “compat/openssl” in the Fossil source tree
- Go to the “win” subdirectory of the Fossil source tree and type:
build64
- Run the command:
fossil test-httpmsg https://fossil-scm.org/
Additional remarks:
- If I comment-out the call to SSL_CTX_load_verify_store() at http_ssl.c:324 I do not see the crash and OpenSSL 3.5.0 appears to work normally.
- I know just enough about OpenSSL to be dangerous, so it is well within the realm of possibility that I’m doing something wrong in Fossil. If you have any hints for me, they will be appreciated.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (11 by maintainers)
Commits related to this issue
- Fix winstore provider to work with recent decoder changes Changes made recently in commit 31b5f3f made changes to how a default decoder was created, in which ossl_decoder_instance_new() started retur... — committed to nhorman/openssl by nhorman 2 years ago
- Fix winstore provider to work with recent decoder changes Changes made recently in commit 31b5f3f made changes to how a default decoder was created, in which ossl_decoder_instance_new() started retur... — committed to openssl/openssl by nhorman 2 years ago
- Fix winstore provider to work with recent decoder changes Changes made recently in commit 31b5f3f made changes to how a default decoder was created, in which ossl_decoder_instance_new() started retur... — committed to retdec-build/openssl by nhorman 2 years ago
- Fix winstore provider to work with recent decoder changes Changes made recently in commit 31b5f3f made changes to how a default decoder was created, in which ossl_decoder_instance_new() started retur... — committed to Sashan/openssl by nhorman 2 years ago
- Fix winstore provider to work with recent decoder changes Changes made recently in commit 31b5f3f made changes to how a default decoder was created, in which ossl_decoder_instance_new() started retur... — committed to Sashan/openssl by nhorman 2 years ago
- Fix winstore provider to work with recent decoder changes Changes made recently in commit 31b5f3f made changes to how a default decoder was created, in which ossl_decoder_instance_new() started retur... — committed to siemens/openssl by nhorman 2 years ago
- Fix winstore provider to work with recent decoder changes Changes made recently in commit 31b5f3f made changes to how a default decoder was created, in which ossl_decoder_instance_new() started retur... — committed to MichaelA-Fireblocks/openssl by nhorman 2 years ago
- Fix winstore provider to work with recent decoder changes Changes made recently in commit 31b5f3f made changes to how a default decoder was created, in which ossl_decoder_instance_new() started retur... — committed to MichaelA-Fireblocks/openssl by nhorman 2 years ago
A quick bisect seems to suggest that commit f5981c962 is responsible for this change