Repository navigation
Backport #115702 to 26.6: Fix integer overflow in String deserialization - #118200
Conversation
ba51ba2 to
5bb0496
Compare
|
Workflow [BackportPR], commit [9bbe427] Summary: ✅ |
|
TL;DR: this backport is missing one hunk that the 26.7 twin (#118201) has — the 128-bit guard on the The target branch carries the same untrusted-sizes overflow the PR fixes elsewhere, in the skipped-prefix path ( #118201 adds exactly this guard ( |
…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
|
🕵 Thanks, ported in 08dc0ad: the The same commit also fixes the reason all three builds were red here: on this branch |
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]>
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=118200&sha=08dc0ad5bb7e1ac4087de91e9daa77f7342443d9&name_0=BackportPR&name_1=Stress%20test%20%28amd_tsan%29 and provide a fix in a separate PR. If the fix is already in progress, link it here. The only red here is This is the same signature as #106737 (STID The base branch |
|
No fix is in progress, so there is nothing to link. The fix is already on master: this red is a release branch gap, not a residual master path. Master is clean, and the 2026-08/09 dates are 26.6 rows. Branch cut date against merge date, confirmed by content markers in
No cherry-pick or backport PR exists for either fix (control: the same search for #113188 returns 5). Mechanism on this run. The Stress harness randomizes the Keeper feature flags, and here it wrote 26.7 is the natural experiment: it carries #108441 but not #108890, it runs the carrier test (215 commits in the window), and it has zero hits. So #108441 alone removes the observed signature, and #108890 closes only the residual re-check race that 26.7 has never exhibited. Off CI the abort is What I need is the label, not a hand written release branch PR, per @ pufit's rule that you reaffirmed on #111910 on 2026-07-27. Could you apply On #106737: the master data supports its closure, and the remaining exposure is release branch only, so I would not reopen it on this evidence. If you would rather track the release branch gap in a new issue than through the label, say so and I will open one. |
|
🕵 Thank you, the analysis is right: the signature is confined to I have applied the This PR itself is merged, so nothing else remains here. |
Original pull-request #115702
Cherry-pick pull-request #118147
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.6.5.55