Skip to content

Bump mariadb-connector-c to v3.4.10 - #119510

Merged
thevar1able merged 5 commits into
ClickHouse:masterfrom
actueleai:bump-mariadb-connector-c-v3.4.10
Oct 13, 2026
Merged

thevar1able merged 5 commits into
ClickHouse:masterfrom
actueleai:bump-mariadb-connector-c-v3.4.10

Conversation

@actueleai

@actueleai actueleai commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Bump mariadb-connector-c to v3.4.10, a security release fixing out-of-bounds reads in field, handshake and row parsing, a TLS verification bypass during auth-switch, and a PBKDF2 CPU-stall in the parsec auth plugin.

ClickHouse-side changes

  • contrib/mariadb-connector-c-cmake/CMakeLists.txt — CPACK_PACKAGE_VERSION_PATCH bumped 9 to 10; feeds the generated mariadb_version.h.

Fork

  • ClickHouse fork branch ClickHouse/v3.4.10 carries 5 ClickHouse patches (incl. the new OpenSSL error-queue clearing); the three earlier timeout/TLS patches were absorbed by the rewritten pvio_socket.c and openssl.c and dropped.

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

Update mariadb-connector-c to v3.4.10.


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

Version info

  • Merged into: 26.10.1.2325-master (included in 26.10 and later)
  • Backported to: 26.9.19.11, 26.8.27.11, 26.7.32.8, 26.3.52.4

Points the submodule at the ClickHouse fork branch `ClickHouse/v3.4.10`
(`eebaeaaa8255`), which carries the remaining ClickHouse patch series
rebased onto upstream `v3.4.10`.

Three of the seven patches that were on the old pin are gone because
upstream merged equivalent fixes into `v3.4.10`:

* `pvio_socket_wait_io_or_timeout` now re-polls with the remaining time
  budget on `EINTR` and reports `ETIMEDOUT` when it is exhausted, so
  `MYSQL_OPT_CONNECT_TIMEOUT` is honoured under periodic signals.
* The TLS handshake loop in `libmariadb/secure/openssl.c` waits with
  `pvio->timeout[PVIO_CONNECT_TIMEOUT]` instead of a hardcoded 5 ms and
  passes `is_read` correctly for the write direction.

The four remaining patches (atomic `max_allowed_packet` /
`net_buffer_length`, the `_Atomic` shim for `g++`, dropping the
`getservbyname`/`MYSQL_TCP_PORT` lookup, and removing the `docs`
submodule) are unchanged in content.

Upstream `v3.4.10` adds no new source files under `libmariadb/` or
`plugins/` (only a replication fuzzer under `tools/`, which ClickHouse
does not build), so the source lists in
`contrib/mariadb-connector-c-cmake/CMakeLists.txt` need no changes; only
`CPACK_PACKAGE_VERSION_PATCH` is bumped to match upstream.

Co-Authored-By: Claude Opus 5 <[email protected]>
@thevar1able thevar1able added the can be tested Allows running workflows for external contributors label Sep 11, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [0114269]

Summary: ✅


AI Review

Summary

This PR updates the bundled mariadb-connector-c to v3.4.10 and refreshes the MySQL integration-test server certificate so the existing SSL coverage keeps passing with the connector's stricter hostname verification. I did not find a current correctness, safety, or packaging regression in the ClickHouse-side changes, and there are no new inline findings to post.

Final Verdict

Status: ✅ Approve

@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. comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. labels Sep 11, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 011426949 with master 360bb0de6 (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

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

Job report

actueleai and others added 2 commits October 1, 2026 14:57
…tor-c-v3.4.10

# Conflicts:
#	contrib/mariadb-connector-c
Points the submodule at the ClickHouse fork branch `ClickHouse/v3.4.10`
(`b3c09ab333c2`), which carries the ClickHouse patch series rebased onto
upstream `v3.4.10`.

The four long-standing patches are unchanged in content: atomic
`max_allowed_packet` / `net_buffer_length` with the `_Atomic` shim for
`g++`, dropping the `getservbyname`/`MYSQL_TCP_PORT` lookup in
`mysql_once_init`, removing the `services` database dependency, and
removing the `docs` submodule. A new patch clears the OpenSSL error queue
before every SSL call that `SSL_get_error` reads, so a leftover
`ERR_LIB_SYS` entry no longer turns a signal-interrupted TLS read into a
spurious `SSL_ERROR_SYSCALL`/`CR_SERVER_LOST`.

Upstream `v3.4.10` is mostly a security release: it fixes out-of-bounds
reads in `unpack_fields` (CONC-847), `init_read_hdr` (CONC-842), and
`mthd_my_read_rows` (CONC-843), a TLS verification bypass during
auth-switch (CONC-846), a PBKDF2 CPU-stall in the `parsec` plugin
(CONC-838), and clamps server-provided field lengths and the default
`MAX_RESULT_COLUMNS` (CONC-820). The `pvio_socket` and OpenSSL TLS paths
were rewritten, which is why the three earlier ClickHouse timeout/TLS
patches are dropped as upstreamed.

No new source files were added under `libmariadb/` or `plugins/` (only a
replication fuzzer under `tools/`, which ClickHouse does not build), so
the source lists in `contrib/mariadb-connector-c-cmake/CMakeLists.txt`
need no changes; `CPACK_PACKAGE_VERSION_PATCH` is already bumped to 10.

Co-Authored-By: Claude Code <[email protected]>
@actueleai actueleai changed the title Bump mariadb-connector-c from v3.4.9 to v3.4.10 Bump mariadb-connector-c to v3.4.10 Oct 2, 2026
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Oct 2, 2026
@thevar1able thevar1able added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Oct 12, 2026
thevar1able and others added 2 commits October 12, 2026 13:24
`mariadb-connector-c` v3.4.10 no longer skips peer certificate
verification when a CA certificate is configured, so the server hostname
is now checked against the certificate. The test server certificate had
only `CN=server`, which made `test_storage_mysql` SSL tests fail with
`TLS/SSL error: Hostname verification failed`.

Re-sign the server certificate with the existing CA and server key,
adding a `subjectAltName` with the MySQL service hostnames used by the
integration tests.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=119510&sha=f5ed97fed2c10fc817b10e70a291a874feb73450&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20targeted%29
ClickHouse#119510

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@thevar1able
thevar1able added this pull request to the merge queue Oct 13, 2026
Merged via the queue into ClickHouse:master with commit 7520cef Oct 13, 2026
177 checks passed
@thevar1able
thevar1able deleted the bump-mariadb-connector-c-v3.4.10 branch October 13, 2026 21:13
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 13, 2026
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Oct 13, 2026
robot-clickhouse added a commit that referenced this pull request Oct 14, 2026
Cherry pick #119510 to 26.3: Bump `mariadb-connector-c` to v3.4.10
robot-clickhouse added a commit that referenced this pull request Oct 14, 2026
Cherry pick #119510 to 26.7: Bump `mariadb-connector-c` to v3.4.10
robot-clickhouse added a commit that referenced this pull request Oct 14, 2026
Cherry pick #119510 to 26.8: Bump `mariadb-connector-c` to v3.4.10
robot-clickhouse added a commit that referenced this pull request Oct 14, 2026
Cherry pick #119510 to 26.9: Bump `mariadb-connector-c` to v3.4.10
@robot-clickhouse robot-clickhouse added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Oct 14, 2026
clickhouse-gh Bot added a commit that referenced this pull request Oct 14, 2026
Backport #119510 to 26.9: Bump `mariadb-connector-c` to v3.4.10
clickhouse-gh Bot added a commit that referenced this pull request Oct 14, 2026
Backport #119510 to 26.8: Bump `mariadb-connector-c` to v3.4.10
thevar1able added a commit that referenced this pull request Oct 14, 2026
Backport #119510 to 26.3: Bump `mariadb-connector-c` to v3.4.10
@clickgapai

Copy link
Copy Markdown
Contributor

@actueleai @thevar1able — this PR looks backward incompatible but is categorized as Build/Testing/Packaging Improvement.

Why: MySQL connections with ssl_ca/ssl_ca_pem now verify the server certificate chain and host name; existing setups that connect by IP or by a name missing from the certificate stop working after upgrade.

  • Measured with clickhouse local against clickhouse/test-mysql80 using the PR's certs. 26.10.1.2396 (this PR) rejects a cert from an unrelated CA (self-signed certificate in certificate chain) and rejects an IP connection with the correct CA (Hostname verification failed).
  • 26.5.1.882, 26.7.27.3, 26.8.27.9 and 26.9.16.11 accept both over TLS (Ssl_cipher = TLS_AES_256_GCM_SHA384). In other words, ssl_ca was not enforced at all on those releases.
  • 26.3.34.136 (connector 3.1.29) rejects the wrong CA but accepts the IP connection. Host name verification is new on every branch.
  • Root cause on the ClickHouse side: our cmake leaves DEFAULT_SSL_VERIFY_SERVER_CERT undefined (generated ma_config.h:153), so mysql_init sets tls_allow_invalid_server_cert=1. 3.4.9 skipped all verification in that case. 3.4.10 no longer skips it when ssl_ca is set (libmariadb/ma_tls.c:122). plugins/auth/my_auth.c:476-486 then fails the connection on any host other than 127.0.0.1/::1.
  • The PR's own integration certs had to be regenerated for exactly this reason. The PR is backported to 26.3, 26.8 and 26.9 (26.7 open), and its only changelog line is the title.
  • Alternative if maintainers keep the category: add a changelog entry that states the stricter verification.

Suggested category: Backward Incompatible Change. Ignore if the change is intentionally non-breaking.

thevar1able added a commit that referenced this pull request Oct 16, 2026
Backport #119510 to 26.7: Bump `mariadb-connector-c` to v3.4.10
@thevar1able

Copy link
Copy Markdown
Member

This is a sane behavior, probably needs only a changelog update.

@egor-click egor-click added the pr-backward-incompatible Pull request with backwards incompatible changes label Oct 19, 2026
alexey-milovidov pushed a commit to vikashkumar2020/ClickHouse that referenced this pull request Oct 19, 2026
…ble change

After ClickHouse#119510, MySQL connections
that set `ssl_ca` or `ssl_ca_pem` verify the server certificate chain and host
name, which breaks setups that connect by an IP or a name missing from the
certificate. Move its entry to "Backward Incompatible Change" in `CHANGELOG.md`
and in the changelogs of the patch releases it was backported to.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. manual approve Manual approve required to run CI pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backward-incompatible Pull request with backwards incompatible changes 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.

7 participants