Skip to content

Stable 24.3 Backport of #127318 - Distrust the compromised eMudhra certificates - #2726

Merged
zvonand merged 2 commits into
releases/24.3.18from
backports/releases/24.3.18/127318
Oct 28, 2026
Merged

zvonand merged 2 commits into
releases/24.3.18from
backports/releases/24.3.18/127318

Conversation

@zvonand

@zvonand zvonand commented Oct 28, 2026

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

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

Hardening: certificate chains containing the compromised eMudhra intermediate CAs or the roots that issued them (emSign Root TLS CA - G3, emSign ECC Root CA - G3) are rejected even if the trust store of the operating system still trusts them. The CA certificates embedded into the binary (used only when the system has none) are updated from the Chromium root store. There is no security issue in typical use cases. (ClickHouse#127318 by @alexey-milovidov)

Documentation entry for user-facing changes

...

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

Algunenano and others added 2 commits October 28, 2026 15:56
…-certificates

Distrust the compromised eMudhra certificates

Conflicts committed as-is; the next commit resolves them:
- contrib/grpc (both modified)
- tests/integration/test_embedded_ca_certificates/test.py (modify/delete (deleted by us, changed by them))
Backported the Poco eMudhra check unchanged; kept 24.3's contrib/grpc commit and dropped the embedded-CA test, since 24.3 has no embedded CA bundle.
@altinity-robot

altinity-robot commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

This is an automated comment for commit a3d2a94 with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Check nameDescriptionStatus
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc❌ failure
Successful checks
Check nameDescriptionStatus
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR✅ success
ClickHouse build checkBuilds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The cmake options can be found in the build log, grepping for cmake. Use these options and follow the general build process✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Grype Scan altinityinfra/clickhouse-keeper:2726-24.3.18.10334.altinitystableThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Grype Scan altinityinfra/clickhouse-server:2726-24.3.18.10334.altinitystable-alpineThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Grype Scan altinityinfra/clickhouse-server:2726-24.3.18.10334.altinitystableThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
Mergeable CheckChecks if all other necessary checks are successful✅ success
Ready for releaseThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success

@zvonand

zvonand commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

@blau-ai

@blau-ai

blau-ai commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

CI triage for a3d2a94

Verdict: 3 red checks. None are caused by this PR. 2 are known-flaky memory tests, and 1 is DCO, which fails on unsigned upstream commits. Builds, stateful tests, integration tests and the other stateless shards are all green, and Mergeable Check passes.

Check Failing test Classification
Stateless tests (asan) [1/4] 02152_http_external_tables_memory_tracking Known flaky, not this PR
Stateless tests (ubsan) [2/2] 02497_remote_disk_fat_column Known flaky (server-wide memory pressure), not this PR
DCO – Commits have no sign-off, not a code issue

(The many NOT_FAILED rows in both reports are the usual "Update analyzer_tech_debt.txt" notices. They aren't failures.)


1. 02152_http_external_tables_memory_tracking: Stateless tests (asan) [1/4]

report

 Checking input_format_parallel_parsing=true&
-1
 Checking input_format_parallel_parsing=true&send_progress_in_http_headers=true
-1
 Checking input_format_parallel_parsing=true&cancel_http_readonly_queries_on_client_close=1&readonly=1&send_progress_in_http_headers=true
-1

The test looks in system.trace_log for a sampled MemorySample deallocation with StorageMemory::drop → ~TemporaryTableHolder in the stack. When the sample doesn't show up, it prints nothing instead of 1. Here it happened in 3 of the 8 variants, all with input_format_parallel_parsing=true. This test is plain HTTP plus trace-log sampling, with no TLS involved. Upstream has tracked it as flaky before: ClickHouse#53215.
Next step: safe to re-run.

2. 02497_remote_disk_fat_column: Stateless tests (ubsan) [2/2]

report

Code: 241. DB::Exception: Memory limit (total) exceeded: would use 27.81 GiB (attempt to allocate chunk of 2147485088 bytes),
maximum: 27.54 GiB. OvercommitTracker decision: Query was selected to stop by OvercommitTracker.
... (in query: insert into fat_granularity select number, toString(number) || '_' from numbers(100000) settings max_block_size = 8192, max_insert_threads=8;)

The test inserts FixedString(160000) blocks of about 2 GiB each. The server-wide (total) limit was hit and OvercommitTracker picked this query to kill, so the whole server was under memory pressure from tests running in parallel. That's an environment problem, not this query misbehaving. Upstream has tracked it as flaky before: ClickHouse#68619.
Next step: safe to re-run.

3. DCO

The PR has two commits: the upstream merge b52c76fdb5 (author Raúl Marín) and the conflict-resolution commit a3d2a945c3. Neither has a Signed-off-by: trailer. This is the usual result on upstream backports and isn't about the code.
Next step: ignore it as on other backports, or have a maintainer override it. Getting it green would mean rewriting history (amend + force-push), which I'm not allowed to do.


Why this PR can't cause the two test failures

The only runtime change is in SSLManager::verifyCallback: it calls the new checkDistrustedCertificate() on each certificate in the chain and rejects it if it's on the distrust list. That code runs only during TLS certificate verification. Both failing tests use plain HTTP to the local server (and an s3_cache disk on local MinIO). Neither does a TLS handshake, so the new code is never reached.

Something to check (not a failure)

I don't see a unit-test (gtest) check in this 24.3 CI run, so the new src/Common/tests/gtest_distrusted_certificates.cpp was compiled with the build (if unit tests are enabled there) but not executed by CI. If you want it exercised, run unit_tests_dbms --gtest_filter='*Distrust*' by hand, or ask me to run it on the builder.

@zvonand
zvonand merged commit f277965 into releases/24.3.18 Oct 28, 2026
120 of 125 checks passed
@zvonand zvonand added the verified Approved for release label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants