Skip to content

Bump libcotp from v4.2.1 to v4.2.2 - #122000

Merged
thevar1able merged 2 commits into
ClickHouse:masterfrom
actueleai:bump-libcotp-v4.2.2
Oct 5, 2026
Merged

thevar1able merged 2 commits into
ClickHouse:masterfrom
actueleai:bump-libcotp-v4.2.2

Conversation

@actueleai

@actueleai actueleai commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Bump libcotp from v4.2.1 to v4.2.2. Upstream hardening release: URI/base32 parser fixes, a leak and undefined-behaviour fix, and new fuzzers. Generated OTP codes are unchanged.

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

Update libcotp to v4.2.2.


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

Version info

  • Merged into: 26.10.1.1596-master (included in 26.10 and later)

Upstream release v4.2.2 hardens the base32, OTP-counter and otpauth/YAOTP URI
paths: counters are now encoded to 8 big-endian bytes independently of
`sizeof(long)` and host endianness, `whmac_setkey` releases a previously set
MAC context instead of leaking it, a reused `secret=` URI parameter is zeroed
before being freed, and a truncated percent-escape is rejected instead of being
taken literally. The generated OTP codes are unchanged; the URI-parsing
tightening is not reachable from ClickHouse, which uses only `get_totp_at`.

No ClickHouse-side source or CMake changes were needed: the source list in
`contrib/libcotp-cmake/CMakeLists.txt` is still complete (the new files live
under `fuzz/` and `tests/`), and the `cotp_error_t` enum and the public API are
unchanged.

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

clickhouse-gh Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [e77b199]

Summary: ✅


AI Review

Summary

This PR only bumps the vendored libcotp submodule from v4.2.1 to v4.2.2. I traced ClickHouse's usage of the library to get_totp_at in src/Access/Common/OneTimePassword.cpp; the upstream changes on that path are hardening-only (32-bit counter encoding, correct error propagation on allocation failure, and EVP_MAC_CTX leak cleanup), and the vendoring source list in contrib/libcotp-cmake/CMakeLists.txt still matches upstream's OpenSSL backend. I did not find a correctness, compatibility, or packaging issue in the bump.

Final Verdict
  • Status: ✅ Approve

LLVM Coverage Report

Measured on commit e77b199.

Metric Baseline Current Δ
Lines 88.10% 88.10% +0.00%
Functions 91.70% 91.70% +0.00%
Branches 79.50% 79.50% +0.00%

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

Newly covered: +173 lines in 47 files (-149 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. comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. labels Sep 24, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing e77b19924 with master 2b6ce0998 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 1c1fa8d1d; 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

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

Job report

@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Oct 2, 2026
@thevar1able
thevar1able added this pull request to the merge queue Oct 5, 2026
Merged via the queue into ClickHouse:master with commit 79179c1 Oct 5, 2026
149 checks passed
@thevar1able
thevar1able deleted the bump-libcotp-v4.2.2 branch October 5, 2026 16:00
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 5, 2026
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-build Pull request with build/testing/packaging improvement 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.

3 participants