Skip to content

Commit e51de5f

Browse files
committed
[yugabyte#30735] build: Bump OpenSSL verison to 3.5.7/3.1.2
Summary: Bumping OpenSSL to 3.5.7, since 3.0.x is going EOL in September, and 3.5.x is the next LTS series. Also bumping the FIPS provider to 3.1.2, since the current version (3.0.8) will no longer be certified after September, and 3.1.2 is the newest FIPS certified version. As of OpenSSL 3.2.x, `openssl req` and `openssl ca` always produce X.509v3 certificates instead of X.509v1 certificates. This breaks the certificate generation for our test certificates, so this revision also fixes that issue (related: openssl/openssl#26144). Additionally, the SecureConnectionTest.CipherSuites tests setting the ciphersuites gflag, but uses TLS_AES_128_CCM_8_SHA256 to test, which has been moved to SECLEVEL=0 as of OpenSSL 3.2.x (openssl/openssl#19613). This revision changes it to use TLS_AES_128_CCM_SHA256 instead. A TSAN suppression was also added on `libcrypto.so.3` to catch data races such as: ``` Read of size 8 at 0x7208000a8a40 by thread T53: #0 memcmp ${YB_LLVM_TOOLCHAIN_DIR}-build/src/llvm-project/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors.inc:879:3 (secure_connection_test+0xbd2ca) #1 ASN1_STRING_cmp <null> (libcrypto.so.3+0x22dc5f) #2 yb::rpc::RefinedStream::Handshake() ${YB_SRC_ROOT}/src/yb/rpc/refined_stream.cc:230:37 (libyrpc.so+0x1626f1) #3 yb::rpc::RefinedStream::ProcessReceived(yb::StronglyTypedBool<yb::rpc::ReadBufferFull_Tag>) ${YB_SRC_ROOT}/src/yb/rpc/refined_stream.cc:155:14 (libyrpc.so+0x16244b) ... Previous write of size 8 at 0x7208000a8a40 by thread T52 (mutexes: write M0): #0 memcpy ${YB_LLVM_TOOLCHAIN_DIR}-build/src/llvm-project/compiler-rt/lib/tsan/rtl/../../sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc:117:5 (secure_connection_test+0xabfee) #1 ASN1_STRING_set <null> (libcrypto.so.3+0x22d987) #2 yb::rpc::RefinedStream::Handshake() ${YB_SRC_ROOT}/src/yb/rpc/refined_stream.cc:230:37 (libyrpc.so+0x1626f1) #3 yb::rpc::RefinedStream::ProcessReceived(yb::StronglyTypedBool<yb::rpc::ReadBufferFull_Tag>) ${YB_SRC_ROOT}/src/yb/rpc/refined_stream.cc:155:14 (libyrpc.so+0x16244b) ... Location is heap block of size 21 at 0x7208000a8a40 allocated by thread T52: #0 malloc ${YB_LLVM_TOOLCHAIN_DIR}-build/src/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:682:5 (secure_connection_test+0xaec70) #1 CRYPTO_realloc <null> (libcrypto.so.3+0x34df2d) #2 yb::rpc::RefinedStream::Handshake() ${YB_SRC_ROOT}/src/yb/rpc/refined_stream.cc:230:37 (libyrpc.so+0x1626f1) #3 yb::rpc::RefinedStream::ProcessReceived(yb::StronglyTypedBool<yb::rpc::ReadBufferFull_Tag>) ${YB_SRC_ROOT}/src/yb/rpc/refined_stream.cc:155:14 (libyrpc.so+0x16244b) ... Mutex M0 (0x7210000bb300) created at: #0 pthread_rwlock_init ${YB_LLVM_TOOLCHAIN_DIR}-build/src/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1553:3 (secure_connection_test+0xb409a) #1 CRYPTO_THREAD_lock_new <null> (libcrypto.so.3+0x36174d) #2 yb::rpc::SecureContext::Impl::UseCertificates(string const&, yb::Slice const&, yb::Slice const&) ${YB_SRC_ROOT}/src/yb/rpc/secure_stream.cc:667:3 (libyrpc.so+0x199972) #3 yb::rpc::SecureContext::UseCertificates(string const&, yb::Slice const&, yb::Slice const&) ${YB_SRC_ROOT}/src/yb/rpc/secure_stream.cc:725:17 (libyrpc.so+0x19d0b2) ... ``` This is a false positive with missing frames, which is a known issue with TSAN when some dynamic libraries (OpenSSL in this case) are not instrumented. Switching libcrypto.so with one from a manual instrumented build of OpenSSL resolves the issue, but thirdparty does not currently build properly with instrumented OpenSSL due to dependencies between different libraries (yugabyte#32121). TSAN errors with libcrypto.so were entirely suppressed since there are many different traces in which this surfaces. Test Plan: Jenkins Reviewers: hsunder Reviewed By: hsunder Subscribers: mihnea, ybase Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D50928
1 parent ed47410 commit e51de5f

4 files changed

Lines changed: 32 additions & 24 deletions

File tree

build-support/generate_test_certificates.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ policy = yugabyte_policy
4545
4646
unique_subject = no
4747
copy_extensions = copy
48+
x509_extensions = my_extensions
4849
4950
[ yugabyte_policy ]
5051
commonName = supplied
@@ -55,6 +56,10 @@ distinguished_name = yugabyte_distinguished_name
5556
5657
[ yugabyte_distinguished_name ]
5758
commonName = $common_name
59+
60+
[ my_extensions ]
61+
basicConstraints = critical, CA:true
62+
keyUsage = critical, keyCertSign, cRLSign
5863
EOT
5964

6065
cat > "$dir/ca.conf" <<-EOT
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,116 @@
1-
sha: 773e60eab3f66d340e52f12e69657824559dd62f
1+
sha: e42841c02e3e540840ba44ae23cd2adc3c2c245d
22
archives:
33

44
- os_type: almalinux8
55
architecture: aarch64
66
compiler_type: clang19
7-
tag: v20260523150803-773e60eab3-almalinux8-aarch64-clang19
7+
tag: v20260610131017-e42841c02e-almalinux8-aarch64-clang19
88

99
- os_type: almalinux8
1010
architecture: aarch64
1111
compiler_type: clang19
1212
lto_type: full
13-
tag: v20260523150549-773e60eab3-almalinux8-aarch64-clang19-full-lto
13+
tag: v20260610131047-e42841c02e-almalinux8-aarch64-clang19-full-lto
1414

1515
- os_type: almalinux8
1616
architecture: aarch64
1717
compiler_type: clang21
18-
tag: v20260523150734-773e60eab3-almalinux8-aarch64-clang21
18+
tag: v20260610130721-e42841c02e-almalinux8-aarch64-clang21
1919

2020
- os_type: almalinux8
2121
architecture: aarch64
2222
compiler_type: clang21
2323
lto_type: full
24-
tag: v20260523150701-773e60eab3-almalinux8-aarch64-clang21-full-lto
24+
tag: v20260610131048-e42841c02e-almalinux8-aarch64-clang21-full-lto
2525

2626
- os_type: almalinux8
2727
architecture: x86_64
2828
compiler_type: clang19
29-
tag: v20260523150611-773e60eab3-almalinux8-x86_64-clang19
29+
tag: v20260610130711-e42841c02e-almalinux8-x86_64-clang19
3030

3131
- os_type: almalinux8
3232
architecture: x86_64
3333
compiler_type: clang19
3434
lto_type: full
35-
tag: v20260523150544-773e60eab3-almalinux8-x86_64-clang19-full-lto
35+
tag: v20260610130720-e42841c02e-almalinux8-x86_64-clang19-full-lto
3636

3737
- os_type: almalinux8
3838
architecture: x86_64
3939
compiler_type: clang21
40-
tag: v20260523150649-773e60eab3-almalinux8-x86_64-clang21
40+
tag: v20260610130712-e42841c02e-almalinux8-x86_64-clang21
4141

4242
- os_type: almalinux8
4343
architecture: x86_64
4444
compiler_type: clang21
4545
lto_type: full
46-
tag: v20260523150623-773e60eab3-almalinux8-x86_64-clang21-full-lto
46+
tag: v20260610130747-e42841c02e-almalinux8-x86_64-clang21-full-lto
4747

4848
- os_type: almalinux8
4949
architecture: x86_64
5050
compiler_type: gcc15
51-
tag: v20260523150558-773e60eab3-almalinux8-x86_64-gcc15
51+
tag: v20260610130653-e42841c02e-almalinux8-x86_64-gcc15
5252

5353
- os_type: almalinux9
5454
architecture: x86_64
5555
compiler_type: clang19
56-
tag: v20260523150624-773e60eab3-almalinux9-x86_64-clang19
56+
tag: v20260610130738-e42841c02e-almalinux9-x86_64-clang19
5757

5858
- os_type: almalinux9
5959
architecture: x86_64
6060
compiler_type: clang21
61-
tag: v20260523150618-773e60eab3-almalinux9-x86_64-clang21
61+
tag: v20260610130744-e42841c02e-almalinux9-x86_64-clang21
6262

6363
- os_type: almalinux9
6464
architecture: x86_64
6565
compiler_type: gcc15
66-
tag: v20260523150613-773e60eab3-almalinux9-x86_64-gcc15
66+
tag: v20260610130729-e42841c02e-almalinux9-x86_64-gcc15
6767

6868
- os_type: macos
6969
architecture: arm64
7070
compiler_type: clang
71-
tag: v20260523150348-773e60eab3-macos-arm64
71+
tag: v20260610130458-e42841c02e-macos-arm64
7272

7373
- os_type: macos
7474
architecture: arm64
7575
compiler_type: clang21
76-
tag: v20260523150347-773e60eab3-macos-arm64-clang21
76+
tag: v20260610130502-e42841c02e-macos-arm64-clang21
7777

7878
- os_type: macos
7979
architecture: x86_64
8080
compiler_type: clang
81-
tag: v20260523150545-773e60eab3-macos-x86_64
81+
tag: v20260610130717-e42841c02e-macos-x86_64
8282

8383
- os_type: macos
8484
architecture: x86_64
8585
compiler_type: clang21
86-
tag: v20260523150518-773e60eab3-macos-x86_64-clang21
86+
tag: v20260610130703-e42841c02e-macos-x86_64-clang21
8787

8888
- os_type: ubuntu22.04
8989
architecture: x86_64
9090
compiler_type: clang19
91-
tag: v20260523150551-773e60eab3-ubuntu2204-x86_64-clang19
91+
tag: v20260610130654-e42841c02e-ubuntu2204-x86_64-clang19
9292

9393
- os_type: ubuntu22.04
9494
architecture: x86_64
9595
compiler_type: clang21
96-
tag: v20260523150642-773e60eab3-ubuntu2204-x86_64-clang21
96+
tag: v20260610162042-e42841c02e-ubuntu2204-x86_64-clang21
9797

9898
- os_type: ubuntu22.04
9999
architecture: x86_64
100100
compiler_type: gcc15
101-
tag: v20260523150606-773e60eab3-ubuntu2204-x86_64-gcc15
101+
tag: v20260610130702-e42841c02e-ubuntu2204-x86_64-gcc15
102102

103103
- os_type: ubuntu24.04
104104
architecture: x86_64
105105
compiler_type: clang19
106-
tag: v20260523150629-773e60eab3-ubuntu2404-x86_64-clang19
106+
tag: v20260610130659-e42841c02e-ubuntu2404-x86_64-clang19
107107

108108
- os_type: ubuntu24.04
109109
architecture: x86_64
110110
compiler_type: clang21
111-
tag: v20260523150610-773e60eab3-ubuntu2404-x86_64-clang21
111+
tag: v20260610130814-e42841c02e-ubuntu2404-x86_64-clang21
112112

113113
- os_type: ubuntu24.04
114114
architecture: x86_64
115115
compiler_type: gcc15
116-
tag: v20260523150519-773e60eab3-ubuntu2404-x86_64-gcc15
116+
tag: v20260610130812-e42841c02e-ubuntu2404-x86_64-gcc15

build-support/tsan-suppressions.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,6 @@ race:std::fs::
199199
race:std::sys::
200200
race:documentdb_gateway::
201201
race:pg_documentdb_gw_host::
202+
203+
# False positive because we compile OpenSSL without TSAN instrumentation (#32121).
204+
race:libcrypto.so.3

src/yb/integration-tests/secure_connection_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ TEST_F_EX(SecureConnectionTest, CipherList, SecureConnectionCipherListTest) {
221221

222222
class SecureConnectionCipherSuitesTest : public SecureConnectionTest {
223223
void SetUp() override {
224-
ANNOTATE_UNPROTECTED_WRITE(FLAGS_ciphersuites) = "TLS_AES_128_CCM_8_SHA256";
224+
ANNOTATE_UNPROTECTED_WRITE(FLAGS_ciphersuites) = "TLS_AES_128_CCM_SHA256";
225225
ANNOTATE_UNPROTECTED_WRITE(FLAGS_ssl_protocols) = "tls13";
226226
SecureConnectionTest::SetUp();
227227
}

0 commit comments

Comments
 (0)