Repository navigation
Backport #115702 to 26.7: Fix integer overflow in String deserialization - #118201
Merged
Merged
Conversation
robot-clickhouse
force-pushed
the
backport/26.7/115702
branch
from
September 5, 2026 02:10
7b557f6 to
0fc2e6e
Compare
Contributor
|
Workflow [BackportPR], commit [66409ab] Summary: ✅ |
This was referenced Sep 5, 2026
In 26.7, `deserializeBinaryBulkWithMultipleStreams` takes a `ColumnPtr &` rather than an `IColumn &`, so the helper in `gtest_string_serialization.cpp` has to hold the result as a `ColumnPtr`, as the other tests in the file already do. This fixes the build failure of the backport: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=118201&sha=0fc2e6e46d73a58902464e1125d897a8e7acf479&name_0=BackportPR&name_1=Build%20%28amd_debug%29 #118201 Co-Authored-By: Claude Fable 5.1 <[email protected]>
alexey-milovidov
added a commit
that referenced
this pull request
Sep 5, 2026
…ix the test signature The 26.6 branch still has the `rows_offset` parameter of `deserializeBinaryBulkWithMultipleStreams` (removed on master), so the backported `gtest_string_serialization.cpp` did not compile (five arguments where six are expected). Port the same branch-only adaptation as the 26.7 twin (#118201): - `deserializeBinaryBulkWithSizeStream`: accumulate the sizes of the rows skipped by `rows_offset` in 128 bits and reject a sum above `MAX_TOTAL_STRING_SIZE` with `INCORRECT_DATA`, as the skipped prefix comes from the same untrusted sizes stream and an unchecked `size_t` sum could wrap and make `ignore` skip a wrong number of bytes. - `expectSizesStreamRejected` takes `rows_offset`, holds the result as a `ColumnPtr` (the branch signature takes `ColumnPtr &`), and a new test `WithSizeStreamHugeSkippedSizeIsRejected` covers the skipped-prefix path. CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=118200&sha=5bb0496be03bc66420b1316da678c4c25350ec6d&name_0=BackportPR&name_1=Build%20%28amd_debug%29 PR: #118200
alexey-milovidov
added a commit
that referenced
this pull request
Sep 5, 2026
Port the same branch-only adaptation as the 26.6 and 26.7 twins (#118200, #118201), as requested in the review of this PR: - `deserializeBinaryBulkWithSizeStream`: accumulate the sizes of the rows skipped by `rows_offset` in 128 bits and reject a sum above `MAX_TOTAL_STRING_SIZE` with `INCORRECT_DATA`. The skipped prefix comes from the same untrusted sizes stream, so an unchecked `size_t` sum could wrap and make `ignore` skip a wrong number of bytes, yielding silently wrong string data instead of a rejection. - `expectSizesStreamRejected` takes `rows_offset`, and the new gtest `WithSizeStreamHugeSkippedSizeIsRejected` covers the skipped-prefix path. PR: #118199 Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original pull-request #115702
Cherry-pick pull-request #118148
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.
The PR source
The PR is created in the CI job
Version info
26.7.7.30