Repository navigation
Cherry pick #117404 to 26.7: Fix out of bound in timeSeriesGroupArray() - #118553
Conversation
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.
…-timeseries-grouparray
…es-grouparray Fix out of bound in timeSeriesGroupArray()
|
Dear @nikitamikhaylov, @vitlibar, this cherry-pick PR has not been updated for 3d0h2m50s. 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. |
|
Dear @nikitamikhaylov, @vitlibar, this cherry-pick PR has not been updated for 7d0h2m25s. Closing automatically. If you still want to backport #117404, please resolve the conflicts and reopen this PR. |
|
Dear @nikitamikhaylov, @vitlibar, this PR is opened while #117404 was marked as backported. The If the cherry-pick is not needed anymore, then just close this PR. |
|
@groeneai resolve the conflicts. |
|
Your resolution landed before I got here, so nothing is left to do on this one. For the rest of the wave: #117404 now reaches every supported branch. 26.9 has it from the branch cut, 26.8 via #118554, and the 26.3 and 26.7 cherry-picks merged this morning (#118551 and this PR) with backports #121928 and #121934 open. The only arm still missing it is 26.6, whose cherry-pick #118552 was auto-closed on 2026-09-17 while conflicting. SECURITY.md dropped 26.6 from the supported set on 2026-09-21 (d035660) and the last robot-created 26.6 backport was 2026-09-18, so I am leaving that one closed. Say so if you want 26.6 anyway and I will resolve it. |
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-picklocally.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:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job