Skip to content

Bump openssl from openssl-3.5.7 to openssl-3.5.8 - #118927

Merged
thevar1able merged 1 commit into
ClickHouse:masterfrom
actueleai:bump-openssl-openssl-3.5.8
Sep 9, 2026
Merged

thevar1able merged 1 commit into
ClickHouse:masterfrom
actueleai:bump-openssl-openssl-3.5.8

Conversation

@actueleai

@actueleai actueleai commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Updates contrib/openssl from ClickHouse/openssl-3.5.7 (26868a38972e) to ClickHouse/openssl-3.5.8 (614167b874c6), which tracks the upstream openssl-3.5.8 tag released on 25 Aug 2026. The fork branch carries the same 13 ClickHouse patches as before — MSan/TSan/LSan suppressions, no getrandom, no sendmmsg/recvmmsg, ARM getauxval on musl, removed submodules — rebased 1:1 onto the new tag. We stay on the 3.5 LTS line.

3.5.8 is a security and bug-fix patch release, fixing CVE-2026-18798, CVE-2026-63072, CVE-2026-63073, CVE-2026-63074, CVE-2026-63075, CVE-2026-63076, CVE-2026-14456, CVE-2026-14457, CVE-2026-54874 and CVE-2026-75803 in the QUIC, CMS, CMP, DTLS and AEAD code paths. Nothing moved in the build surface: no .c files were added or removed under crypto/, ssl/ or providers/, and the single deletion (crypto/aes/aes_x86core.c) was never referenced, so contrib/openssl-cmake/CMakeLists.txt needs no changes. The 29 touched perlasm generators only differ in copyright headers and an icx/__clang_major__ fallback in AVX detection, and regenerating the assembly from 3.5.7 and from 3.5.8 produces byte-identical output, so the checked-in files under contrib/openssl-cmake/asm/ are left alone.

On the ClickHouse side only the two checked-in generated headers needed adapting. common/include/openssl/opensslv.h gets the patch level 7 → 8, the new version strings and the 25 Aug 2026 release date. common/include/openssl/ssl.h gets the ssl.h.in delta applied by hand — the new SSL_VALUE_QUIC_MAX_PENDING_CONNS value and the SSL_SECOP_PEER_* defines moved next to SSL_SECOP_PEER and marked unused — rather than a wholesale regeneration, since the checked-in headers were not produced by the documented Configure line and carry flags (OPENSSL_NO_FIPS_POST, OPENSSL_NO_FIPS_SECURITYCHECKS, OPENSSL_NO_ACVP_TESTS) the sources depend on. No changes in src/ or .gitmodules.


One thing to fix before pushing: the diff stat also contains contrib/usearch (submodule pointer moved), which is unrelated to this bump and isn't described above — drop it from the branch.

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Update openssl to 3.5.8.


Workflow [PR]
Sync PR [sync-upstream/pr/118927]

Version info

  • Merged into: 26.9.1.1054 (included in 26.9 and later)
  • Backported to: 26.8.3.73, 26.7.7.74, 26.6.5.107, 26.3.33.51

Point `contrib/openssl` at the `ClickHouse/openssl-3.5.8` branch of the
ClickHouse fork, which carries the same 13 ClickHouse patches rebased on
the upstream `openssl-3.5.8` tag.

Generated headers in `contrib/openssl-cmake/common/include/openssl` are
updated with the delta between the two upstream versions only:
- `opensslv.h`: version 3.5.8, release date 25 Aug 2026
- `ssl.h`: add `SSL_VALUE_QUIC_MAX_PENDING_CONNS`, move the unused
  `SSL_SECOP_PEER_*` defines (mirrors `ssl.h.in`)

The pre-generated assembly under `contrib/openssl-cmake/asm` is
byte-identical when regenerated from 3.5.7 and 3.5.8 with `clang-22`,
so it is left untouched.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@thevar1able thevar1able self-assigned this Sep 9, 2026
@thevar1able thevar1able added the can be tested Allows running workflows for external contributors label Sep 9, 2026
@thevar1able
thevar1able self-requested a review September 9, 2026 00:38
@clickhouse-gh

clickhouse-gh Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [2f73ed7]

Summary: ✅


AI Review

Summary

This PR bumps the vendored contrib/openssl submodule from 3.5.7 to 3.5.8 and synchronizes the two checked-in generated headers in contrib/openssl-cmake that actually change on the ClickHouse side. I did not find a correctness, packaging, or header-sync issue in the current diff: the ssl.h edits match the upstream include/openssl/ssl.h.in delta, the opensslv.h version metadata matches VERSION.dat, and there is no missed contrib/openssl-cmake/CMakeLists.txt update for the removed upstream crypto/aes/aes_x86core.c.

Missing context / blind spots
  • ⚠️ The full PR report is still pending, so I could not validate the entire build/test matrix for the new submodule revision. A green PR report for commit 2f73ed7425a1dc415d1258f850106dde5f8037a8 would close that gap.
Final Verdict

✅ No review findings in the current diff. Merge is reasonable once the remaining CI finishes green.

LLVM Coverage Report

Measured on commit 2f73ed7.

Metric Baseline Current Δ
Lines 88.90% 88.90% +0.00%
Functions 91.80% 91.80% +0.00%
Branches 81.30% 81.30% +0.00%

Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage).

Newly covered: +332 lines in 79 files (-190 lines lost coverage) · Details

Full report

@clickhouse-gh clickhouse-gh Bot added pr-build Pull request with build/testing/packaging improvement submodule changed At least one submodule changed in this PR. labels Sep 9, 2026
@thevar1able
thevar1able marked this pull request as ready for review September 9, 2026 00:39
@clickhouse-gh clickhouse-gh Bot added the comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. label Sep 9, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 2f73ed742 with master 5220da5dc (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

178 translation units recompiled, 28 s compile time in total, 178 of them have a recent master baseline.

Job report

@thevar1able thevar1able added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Sep 9, 2026
@thevar1able
thevar1able added this pull request to the merge queue Sep 9, 2026
Merged via the queue into ClickHouse:master with commit 07c5bfb Sep 9, 2026
174 checks passed
@thevar1able
thevar1able deleted the bump-openssl-openssl-3.5.8 branch September 9, 2026 18:25
@robot-ch-test-poll robot-ch-test-poll added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Sep 9, 2026
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 9, 2026
clickhouse-gh Bot pushed a commit that referenced this pull request Sep 9, 2026
clickhouse-gh Bot added a commit that referenced this pull request Sep 9, 2026
Backport #118927 to 26.8: Bump `openssl` from openssl-3.5.7 to openssl-3.5.8
robot-ch-test-poll added a commit that referenced this pull request Sep 10, 2026
Cherry pick #118927 to 26.3: Bump `openssl` from openssl-3.5.7 to openssl-3.5.8
robot-clickhouse added a commit that referenced this pull request Sep 10, 2026
robot-ch-test-poll added a commit that referenced this pull request Sep 10, 2026
Cherry pick #118927 to 26.6: Bump `openssl` from openssl-3.5.7 to openssl-3.5.8
robot-clickhouse added a commit that referenced this pull request Sep 10, 2026
robot-ch-test-poll added a commit that referenced this pull request Sep 10, 2026
Cherry pick #118927 to 26.7: Bump `openssl` from openssl-3.5.7 to openssl-3.5.8
robot-clickhouse added a commit that referenced this pull request Sep 10, 2026
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Sep 10, 2026
clickhouse-gh Bot added a commit that referenced this pull request Sep 10, 2026
Backport #118927 to 26.7: Bump `openssl` from openssl-3.5.7 to openssl-3.5.8
PedroTadim added a commit that referenced this pull request Sep 11, 2026
Backport #118927 to 26.3: Bump `openssl` from openssl-3.5.7 to openssl-3.5.8
PedroTadim added a commit that referenced this pull request Sep 11, 2026
Backport #118927 to 26.6: Bump `openssl` from openssl-3.5.7 to openssl-3.5.8
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 17, 2026
…nt reads

Bump contrib/mariadb-connector-c to pick up a single connector change:
ERR_clear_error() before every SSL_connect/SSL_read/SSL_write whose result is
interpreted through SSL_get_error(), plus capturing errno as the first
statement of ma_tls_set_error().

SSL_get_error() only reports the retry flags of the operation just attempted
while the calling thread's OpenSSL error queue is empty, and openssl.c never
cleared it. A leftover ERR_LIB_SYS entry from any earlier OpenSSL operation on
the same thread is therefore reported first (ossl_ssl_get_error() returns
SSL_ERROR_SYSCALL for ERR_LIB_SYS before it looks at SSL_want_read() and the
BIO retry flag), so a read that OpenSSL had already marked retryable becomes
fatal. ma_tls_set_error() then pops the stale entry, gets NULL from
ERR_reason_error_string() and prints strerror_r(errno) instead, producing

  mysqlxx::BadQuery: TLS/SSL error: Interrupted system call (4)

on a healthy connection, with an errno that need not belong to the failing
call. Every mysql() table function, MySQL table/database engine and MySQL
dictionary read is affected: mysqlxx::Connection::connect enables TLS
unconditionally via mysql_ssl_set, the sampling query profiler is on by
default so query threads take periodic signals, and the TLS path bypasses
ma_recv()'s EINTR retry loop because OPENSSL_USE_BIOMETHOD is undefined and
SSL_set_fd() lets OpenSSL read the socket directly.

No regression test ships with this. With an empty error queue the message is
unreachable on the old pin: sock_read() zeroes errno before every recv, EINTR is
classified retryable, and pvio_socket_wait_io_or_timeout() re-polls it against
its deadline and reports ETIMEDOUT. 428000 instrumented un-injected reads
produced none, and no SQL-reachable producer of a stale ERR_LIB_SYS entry was
found, so the failing arm of a functional test would be unobservable. The fix
was validated by forcing a stale entry on the reading thread instead: 20 of 20
reads and 2-3 of 20 02479_mysql_connect_to_self runs failed before it, 20 of 20
and 50 of 50 passed after, and 125319 stale entries were still measured at SSL
entry on the green arm, so that arm is not vacuous.

The changelog category is the one the fix-carrying contrib bumps use (usearch
ClickHouse#118828, openssl ClickHouse#118927) rather than Bug Fix: the change in this repository is
only the dependency pin, and the Bug Fix category's validation expects a
regression test that reddens on master, which this defect cannot supply.

Related: ClickHouse#105987
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 17, 2026
…nt reads

Bump contrib/mariadb-connector-c to pick up a single connector change:
ERR_clear_error() before every SSL_connect/SSL_read/SSL_write whose result is
interpreted through SSL_get_error(), plus capturing errno as the first
statement of ma_tls_set_error().

SSL_get_error() only reports the retry flags of the operation just attempted
while the calling thread's OpenSSL error queue is empty, and openssl.c never
cleared it. A leftover ERR_LIB_SYS entry from any earlier OpenSSL operation on
the same thread is therefore reported first (ossl_ssl_get_error() returns
SSL_ERROR_SYSCALL for ERR_LIB_SYS before it looks at SSL_want_read() and the
BIO retry flag), so a read that OpenSSL had already marked retryable becomes
fatal. ma_tls_set_error() then pops the stale entry, gets NULL from
ERR_reason_error_string() and prints strerror_r(errno) instead, producing

  mysqlxx::BadQuery: TLS/SSL error: Interrupted system call (4)

on a healthy connection, with an errno that need not belong to the failing
call. Every mysql() table function, MySQL table/database engine and MySQL
dictionary read is affected: mysqlxx::Connection::connect enables TLS
unconditionally via mysql_ssl_set, the sampling query profiler is on by
default so query threads take periodic signals, and the TLS path bypasses
ma_recv()'s EINTR retry loop because OPENSSL_USE_BIOMETHOD is undefined and
SSL_set_fd() lets OpenSSL read the socket directly.

No regression test ships with this. With an empty error queue the message is
unreachable on the old pin: sock_read() zeroes errno before every recv, EINTR is
classified retryable, and pvio_socket_wait_io_or_timeout() re-polls it against
its deadline and reports ETIMEDOUT. 428000 instrumented un-injected reads
produced none, and no SQL-reachable producer of a stale ERR_LIB_SYS entry was
found, so the failing arm of a functional test would be unobservable. The fix
was validated by forcing a stale entry on the reading thread instead: 20 of 20
reads and 2-3 of 20 02479_mysql_connect_to_self runs failed before it, 20 of 20
and 50 of 50 passed after, and 125319 stale entries were still measured at SSL
entry on the green arm, so that arm is not vacuous.

The changelog category is the one the fix-carrying contrib bumps use (usearch
ClickHouse#118828, openssl ClickHouse#118927) rather than Bug Fix: the change in this repository is
only the dependency pin, and the Bug Fix category's validation expects a
regression test that reddens on master, which this defect cannot supply.

Connector change: ClickHouse/mariadb-connector-c#25
Related: ClickHouse#105987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-build Pull request with build/testing/packaging improvement pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants