Skip to content

Cherry pick #117404 to 26.6: Fix out of bound in timeSeriesGroupArray() - #118552

Closed
robot-clickhouse-ci-1 wants to merge 5 commits into
backport/26.6/117404from
cherrypick/26.6/117404
Closed

robot-clickhouse-ci-1 wants to merge 5 commits into
backport/26.6/117404from
cherrypick/26.6/117404

Conversation

@robot-clickhouse-ci-1

Copy link
Copy Markdown
Contributor

Original pull-request #117404

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

vitlibar and others added 5 commits September 1, 2026 20:35
The number of elements is read from the serialized state and was used for a single
allocation upfront, so a state claiming 2^60 or more elements made the size of the
allocation in bytes overflow and the following writes went past the allocated memory.
The array now grows while the data is read.
The count of samples in a bucket comes from the serialized state, so a small state could
ask for an arbitrarily large allocation. Only a bounded number of samples is reserved now
and the buffer grows while the samples are read.
The number of buckets is read from the serialized state and was only checked against
the bucket count derived from the function parameters. A huge window makes that count
enormous, so a tiny state could ask for an arbitrarily large allocation: an 18-byte
state of `timeSeriesChangesToGrid` allocated 1.25 GiB. Only a bounded number of buckets
is reserved now and the map grows while the buckets are read.
…es-grouparray

Fix out of bound in timeSeriesGroupArray()
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Sep 7, 2026
@robot-clickhouse-ci-1

Copy link
Copy Markdown
Contributor Author

Dear @nikitamikhaylov, @vitlibar, this cherry-pick PR has not been updated for 3d0h3m25s. Please resolve the conflicts to backport #117404, or close this PR if the backport is no longer needed. This PR will be automatically closed after 7 days of inactivity.

@robot-ch-test-poll3

Copy link
Copy Markdown
Contributor

Dear @nikitamikhaylov, @vitlibar, this cherry-pick PR has not been updated for 7d0h2m23s. Closing automatically. If you still want to backport #117404, please resolve the conflicts and reopen this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants