Repository navigation
Check the range of bucket numbers in BlockInfo - #131302
Conversation
`BlockInfo::bucket_num` and `BlockInfo::out_of_order_buckets` are read from the native protocol and from temporary files of external aggregation, and are used as indices of the 256 buckets of two-level aggregation. The number of `out_of_order_buckets` is already bounded; now their values and `bucket_num` must be in range (from -1 for `bucket_num`, and from 0 for `out_of_order_buckets`, to 255), otherwise `INCORRECT_DATA` is thrown. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [b9cceca] Summary: ✅
AI ReviewSummaryReviewed commit Missing context / blind spots
Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Slowest function optimization changes (ThinLTO)Median per-function time ratio to the master baseline:
Compile time of recompiled translation units7 translation units recompiled, 6 s compile time in total, 7 of them have a recent master baseline. |
…ed as paths, two readings of one input Blind reviews of the pull requests that introduced nine bugs fixed later (ported in ClickHouse#131294-ClickHouse#131302) showed these gaps: - Data the server wrote itself and reads back (parts, patch parts, packed-file indexes, `ssd_cache` files) was treated as trusted, so out-of-bounds reads on it were dismissed or rated as Nits (ClickHouse#126553, ClickHouse#116007, ClickHouse#86095). - No prompt for overflow of sizes computed from user-controlled counts (`ColumnString::replicate`, ClickHouse#61075). - No prompt for names read from data that become paths (packed archive index, ClickHouse#93414). - A security check that reads its input differently from the consumer (first vs last repeated key, Boolean spellings), which the real review of ClickHouse#106855 missed. Also ask for a separate pass over parsers and security decisions in large pull requests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
BlockInfo::bucket_numandBlockInfo::out_of_order_bucketsare read from the native protocol and from temporary files of external aggregation, and are used as indices of the 256 buckets of two-level aggregation. The number ofout_of_order_bucketsis already bounded; now their values andbucket_nummust be in range (from -1 forbucket_num, and from 0 forout_of_order_buckets, to 255), otherwiseINCORRECT_DATAis thrown.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Validate the bucket numbers of two-level aggregation in blocks received over the native protocol. Original fix by @motsc and @CheSema.
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131302]
Version info
26.11.1.2248-master(included in26.11and later)