Skip to content

Bump brotli from v1.2.0 to v1.2.1 - #127419

Merged
alexey-milovidov merged 4 commits into
ClickHouse:masterfrom
actueleai:bump-brotli-v1.2.1
Oct 25, 2026
Merged

alexey-milovidov merged 4 commits into
ClickHouse:masterfrom
actueleai:bump-brotli-v1.2.1

Conversation

@actueleai

@actueleai actueleai commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Bump brotli from v1.2.0 to v1.2.1, a decoder security fix, staying on the ClickHouse fork line.

Fork

Carries 1 ClickHouse patch (loongarch64 BROTLI_MODEL fix), rebased onto v1.2.1 in ClickHouse/brotli#2.

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC)

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

Update brotli from v1.2.0 to v1.2.1, fixing an out-of-bounds write in the brotli decoder reachable through brotli-compressed input (HTTP Content-Encoding: br, .br files, Parquet).


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

Version info

  • Merged into: 26.11.1.749-master (included in 26.11 and later)
  • Backported to: 26.10.3.6, 26.9.26.18, 26.8.35.17, 26.3.61.13

Update `brotli` to the upstream release `v1.2.1`, which fixes
CVE-2026-111497: an out-of-bounds write in the decoder that permits remote
code execution.

The pin stays on the `ClickHouse/brotli` fork, branch `ClickHouse/v1.2.1`
(head `2d9c9b61f4e7`), which is upstream `v1.2.1` plus the single carried
ClickHouse patch `disable BROTLI_MODEL macro for some targets` (the
loongarch64 fix). The patch rebased onto `v1.2.1` without conflicts, and
`.gitmodules` already names the fork, so it is unchanged.

Upstream changes in the decoder, all internal to `c/dec/decode.c`: the
block-switch helpers now return a `BrotliDecoderErrorCode` instead of a
boolean, so a malformed block switch is reported as the new
`BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH` (-17, previously reserved)
rather than being treated as a truncated stream. The public C API is
otherwise unchanged; `BROTLI_VERSION_PATCH` and `BROTLI_ABI_REVISION` move
to 1.

No ClickHouse-side build adaptation was needed: no source file was added,
removed or renamed, and `contrib/brotli-cmake/CMakeLists.txt` still lists
exactly the `*.c` files under `c/common`, `c/dec` and `c/enc`.

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

clickhouse-gh Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [7912e4b]

@clickhouse-gh clickhouse-gh Bot added pr-critical-bugfix submodule changed At least one submodule changed in this PR. pr-must-backport Pull request should be backported intentionally. Use this label with great care! comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. labels Oct 22, 2026
The malformed stream declares one block type but attempts a block switch.
Decode it both at once and one byte at a time, and require the new
`BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH` error. The test returns -9
with v1.2.0 and -17 with v1.2.1.

Link: ClickHouse#127419
Source: https://github.com/nodejs/node/blob/main/test/parallel/test-zlib-invalid-input.js
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Oct 23, 2026
@alexey-milovidov alexey-milovidov self-assigned this Oct 23, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Merged master (no conflicts). The remaining red checks are not caused by the change itself:

  • Bugfix validation (unit tests) is inconclusive by design for a submodule bump: the job cannot build the before-binary at the merge-base contrib/brotli revision (report). The new test was validated separately against both pins (see the AI review: the old pin returns -9 instead of -17).
  • CH Inc sync: Build (arm_tidy, 2/4) fails on readability-duplicate-include in the private copy of src/Core/Field.cpp, which this PR does not touch.

@groeneai, investigate the CH Inc sync arm_tidy failure (duplicate include in src/Core/Field.cpp in the private repository) and provide a fix in a separate PR. If the fix is already in progress, link it here.

@groeneai

Copy link
Copy Markdown
Collaborator

I checked this. There is nothing to fix in the public repository, and the private build has already recovered:

The sync for the new head 7912e4b9 has not reported yet, and I expect it to pass. I can't see or push to the private repository, so if the same error comes back, the fix has to land there.

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Thanks for checking. Agreed: the CH Inc sync arm_tidy failure came from a short-lived problem on the private side, not from this PR. Nothing needs to change here. The head 7912e4b9 already contains the latest master. Its PR workflow run (https://github.com/ClickHouse/ClickHouse/actions/runs/40141948195) is in action_required because the branch is in a fork, so a maintainer has to approve it before CI and the sync can report.

@alexey-milovidov
alexey-milovidov merged commit bc84324 into ClickHouse:master Oct 25, 2026
1 check failed
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 25, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Oct 25, 2026
clickhouse-gh Bot added a commit that referenced this pull request Oct 25, 2026
Backport #127419 to 26.10: Bump `brotli` from v1.2.0 to v1.2.1

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.

Does the brotli library itself not have its own tests already?

alexey-milovidov pushed a commit that referenced this pull request Oct 26, 2026
Merge backport/26.3/127419 into cherrypick/26.3/127419. The only conflict is
the contrib/brotli submodule: 26.3 pins brotli v1.0.9 (d224526f8fa7), while
master moved v1.2.0 -> v1.2.1. Take the master pin 2d9c9b61f4e7 (the
ClickHouse fork of v1.2.1) and master's contrib/brotli-cmake/CMakeLists.txt
source list from #119096 (v1.0.9 -> v1.2.0), without which v1.2.x does not
link. src/CMakeLists.txt and the new gtest merge cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov pushed a commit that referenced this pull request Oct 26, 2026
Merge backport/26.8/127419 into cherrypick/26.8/127419. The only conflict is
the contrib/brotli submodule: 26.8 pins brotli v1.0.9 (d224526f8fa7), while
master moved v1.2.0 -> v1.2.1. Take the master pin 2d9c9b61f4e7 (the
ClickHouse fork of v1.2.1) and master's contrib/brotli-cmake/CMakeLists.txt
source list from #119096 (v1.0.9 -> v1.2.0), without which v1.2.x does not
link. src/CMakeLists.txt and the new gtest merge cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
robot-clickhouse-ci-2 added a commit that referenced this pull request Oct 26, 2026
Cherry pick #127419 to 26.3: Bump `brotli` from v1.2.0 to v1.2.1
robot-clickhouse-ci-2 added a commit that referenced this pull request Oct 26, 2026
Cherry pick #127419 to 26.8: Bump `brotli` from v1.2.0 to v1.2.1
robot-clickhouse-ci-2 added a commit that referenced this pull request Oct 26, 2026
Cherry pick #127419 to 26.9: Bump `brotli` from v1.2.0 to v1.2.1
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Oct 26, 2026
clickhouse-gh Bot added a commit that referenced this pull request Oct 26, 2026
Backport #127419 to 26.8: Bump `brotli` from v1.2.0 to v1.2.1
clickhouse-gh Bot added a commit that referenced this pull request Oct 26, 2026
Backport #127419 to 26.9: Bump `brotli` from v1.2.0 to v1.2.1
rschu1ze added a commit that referenced this pull request Oct 26, 2026
Backport #127419 to 26.3: Bump `brotli` from v1.2.0 to v1.2.1
zvonand added a commit to Altinity/ClickHouse that referenced this pull request Oct 26, 2026
Antalya 26.8 Backport of ClickHouse#127810 - Backport ClickHouse#127419 to 26.8: Bump `brotli` from v1.2.0 to v1.2.1
zvonand added a commit to Altinity/ClickHouse that referenced this pull request Oct 26, 2026
Antalya 26.3 Backport of ClickHouse#127810 - Backport ClickHouse#127419 to 26.8: Bump `brotli` from v1.2.0 to v1.2.1
zvonand added a commit to Altinity/ClickHouse that referenced this pull request Oct 26, 2026
Antalya 26.6 Backport of ClickHouse#127810 - Backport ClickHouse#127419 to 26.8: Bump `brotli` from v1.2.0 to v1.2.1
zvonand added a commit to Altinity/ClickHouse that referenced this pull request Oct 26, 2026
Stable 26.3 Backport of ClickHouse#127810 - Backport ClickHouse#127419 to 26.8: Bump `brotli` from v1.2.0 to v1.2.1
zvonand added a commit to Altinity/ClickHouse that referenced this pull request Oct 26, 2026
Stable 26.8 Backport of ClickHouse#127810 - Backport ClickHouse#127419 to 26.8: Bump `brotli` from v1.2.0 to v1.2.1
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 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-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-critical-bugfix 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