Skip to content

Bump curl from 8.19 to 8.20 - #106077

Merged
alexey-milovidov merged 1 commit into
masterfrom
bump-curl-8_20_0
May 30, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
bump-curl-8_20_0

Conversation

@thevar1able

@thevar1able thevar1able commented May 28, 2026 •

Copy link
Copy Markdown
Member

Bump curl to upstream release curl-8_20_0.

Adapts the ClickHouse CMake integration for the source layout changes in this release:

  • Add cf-dns.c, dnscache.c, protocol.c, thrdpool.c, thrdqueue.c to the source list (DNS cache split out of hostip.c; new protocol table; new thread pool / queue helpers).
  • Drop curl_rtmp.c (removed upstream).
  • In curl_config.h, rename USE_THREADS_POSIX to HAVE_THREADS_POSIX (now drives USE_MUTEX for curl_share locks), add USE_RESOLV_ARES to wire c-ares as the resolver under the new naming, and define CURL_ENABLE_NTLM to preserve the previous (implicit) NTLM build.

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

Update bundled curl to 8.20.0.

Version info

  • Merged into: 26.6.1.257
  • Backported to: 26.5.3.15, 26.4.5.17, 26.3.14.7, 25.8.25.11

Track upstream `curl-8_20_0` release. Adapt the ClickHouse CMake
integration for the source layout changes in this release:

- Add `cf-dns.c`, `dnscache.c`, `protocol.c`, `thrdpool.c`, `thrdqueue.c`
  to the source list (DNS cache split out of `hostip.c`; new protocol
  table; new thread pool / queue helpers).
- Drop `curl_rtmp.c` (removed upstream).
- In `curl_config.h`, rename `USE_THREADS_POSIX` to `HAVE_THREADS_POSIX`
  (now drives `USE_MUTEX` for `curl_share` locks), add `USE_RESOLV_ARES`
  to wire c-ares as the resolver under the new naming, and define
  `CURL_ENABLE_NTLM` to preserve the previous (implicit) NTLM build.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [0dc2e2b]

Summary: ✅


AI Review

Summary

This PR updates the bundled curl submodule to curl-8_20_0 and adjusts the custom ClickHouse CMake source list/config for upstream layout and macro changes. The source-list update matches the upstream 8.20.0 file delta, but the config change also switches DNS resolution from the previous threaded getaddrinfo backend to c-ares, which is a user-visible behavior change that needs either preserving or explicitly validating.

Findings

⚠️ Majors

  • [contrib/curl-cmake/curl_config.h:62] The bump promises to adapt curl integration, but defining USE_RESOLV_ARES changes the resolver backend rather than only renaming macros. With the old curl_config.h, USE_THREADS_POSIX made curl 8.19 select the threaded resolver path before the USE_ARES branch, so resolution went through system getaddrinfo. The new USE_RESOLV_ARES path uses c-ares, which can stop honoring NSS-backed names that getaddrinfo handled before. Preserve the existing behavior with USE_RESOLV_THREADED plus HAVE_THREADS_POSIX, or document the intentional c-ares switch and verify the affected resolver behavior.
Tests
  • ⚠️ Add the smallest focused validation for the chosen resolver behavior: either evidence that the 8.20 build still uses the threaded getaddrinfo resolver, or a test/explicit release note covering the intentional switch to c-ares for deployments relying on non-DNS resolver sources.
Final Verdict

Status: ⚠️ Request changes

Minimum required action: preserve the previous resolver backend, or make the c-ares switch explicit and covered by focused evidence.

@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 May 28, 2026
@thevar1able
thevar1able marked this pull request as ready for review May 28, 2026 20:23
@thevar1able
thevar1able requested a review from rschu1ze May 28, 2026 20:24
#define USE_THREADS_POSIX
#define HAVE_THREADS_POSIX
#define USE_ARES
#define USE_RESOLV_ARES

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the resolver backend, not just the macro spelling. With the old curl_config.h, USE_THREADS_POSIX made 8.19 take the threaded resolver path in curl_setup.h before it ever considered USE_ARES, so name resolution went through system getaddrinfo. Defining USE_RESOLV_ARES here makes 8.20 use c-ares instead, which can stop honoring NSS-backed names that getaddrinfo resolves, such as entries from non-DNS nsswitch.conf providers.

If the bump is meant to preserve ClickHouse's existing resolver behavior, this should be USE_RESOLV_THREADED with HAVE_THREADS_POSIX. If switching to c-ares is intentional, the PR should call it out as a behavior change and cover at least one resolver case that matters for ClickHouse deployments.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems legitimate. The PR description states "add USE_RESOLV_ARES to wire c-ares as the resolver under the new naming", why are we making this change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently USE_ARES was a noop previously, and agent "fixed it" along the way. I'd say we should switch to USE_RESOLV_ARES if it correcly makes curl use ares resolver. I'll take a look into if we still need USE_ARES.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My agent claims that there is no reason to switch to c-ares since we don't use curl widely anyway, and it could result in some random thing not resolving. 🤷

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@george-larionov george-larionov self-assigned this May 29, 2026
#define HAVE_THREADS_POSIX
#define USE_ARES
#define USE_RESOLV_ARES
#define CURL_ENABLE_NTLM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't use NTLM at all, right? Maybe we should drop it and the files relevant to it. Perhaps out of scope for this PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's drop.

#define USE_THREADS_POSIX
#define HAVE_THREADS_POSIX
#define USE_ARES
#define USE_RESOLV_ARES

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems legitimate. The PR description states "add USE_RESOLV_ARES to wire c-ares as the resolver under the new naming", why are we making this change?

@george-larionov george-larionov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, up to you what to do with c-ares.

@alexey-milovidov

Copy link
Copy Markdown
Member

It's ok, we can switch to c-ares and see what happens.

PS. I wanted to remove the curl dependency altogether, but it is still used in some obscure places.

@alexey-milovidov
alexey-milovidov merged commit a8373d0 into master May 30, 2026
165 of 166 checks passed
@alexey-milovidov
alexey-milovidov deleted the bump-curl-8_20_0 branch May 30, 2026 07:47
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 30, 2026
@chethan-64

Copy link
Copy Markdown

Bump of curl from 8.19 to 8.20 resolve multiple CVEs [ CVE-2026-4873, CVE-2026-6253, CVE-2026-6276, CVE-2026-6429, CVE-2026-7009, CVE-2026-7168 ,CVE-2026-5545 ] which are relevant to ClickHouse . Since this upgrade is relevant for the 25.8 release line as well, Requesting to consider backporting the associated bump to 25.8!!
Thank You.

@thevar1able thevar1able added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Jun 2, 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 Jun 2, 2026
robot-clickhouse-ci-2 added a commit that referenced this pull request Jun 2, 2026
Cherry pick #106077 to 25.8: Bump `curl` from 8.19 to 8.20
robot-clickhouse-ci-2 added a commit that referenced this pull request Jun 2, 2026
Cherry pick #106077 to 26.3: Bump `curl` from 8.19 to 8.20
robot-clickhouse-ci-2 added a commit that referenced this pull request Jun 2, 2026
Cherry pick #106077 to 26.4: Bump `curl` from 8.19 to 8.20
robot-clickhouse-ci-2 added a commit that referenced this pull request Jun 2, 2026
Cherry pick #106077 to 26.5: Bump `curl` from 8.19 to 8.20
@robot-ch-test-poll robot-ch-test-poll added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jun 2, 2026
alexey-milovidov added a commit that referenced this pull request Jun 3, 2026
Backport #106077 to 25.8: Bump `curl` from 8.19 to 8.20
alexey-milovidov added a commit that referenced this pull request Jun 9, 2026
Backport #106077 to 26.3: Bump `curl` from 8.19 to 8.20
thevar1able added a commit that referenced this pull request Jun 10, 2026
Backport #106077 to 26.5: Bump `curl` from 8.19 to 8.20
thevar1able added a commit that referenced this pull request Jun 10, 2026
Backport #106077 to 26.4: Bump `curl` from 8.19 to 8.20
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…6077

Backport ClickHouse#106077 to 26.4: Bump `curl` from 8.19 to 8.20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

6 participants