Repository navigation
Bounds-check skipping fully filtered values in the Parquet PLAIN string decoder - #131797
Conversation
…ring decoder When `PREWHERE` filters out every value of a page, `PlainStringDecoder` (with a non-trivial converter, e.g. reading `Geometry` from WKB) skipped the values with its own loop that did not check the lengths against the page size, so a malformed page could make it read out of bounds. Use `skip`, which checks them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [dc2eb9c] Summary: ✅
AI ReviewSummaryThe change bounds-checks skipped The regression passed all 50 runs in targeted ARM ASan/UBSan CI at the fixing commit; the relevant decoder implementation and test are unchanged at the reviewed head. Tests were not run locally because this checkout has no ClickHouse binary or build directory. Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 17 s compile time in total, 7 of them have a recent master baseline. |
…ringDecoder` The decoder loaded the four-byte length prefix before checking the remaining bytes, relying on the input being padded. A page retained directly from a page-cache cell is not padded, so a malformed page could still read up to four bytes beyond the allocation. Check that the prefix itself is available in every loop of `PlainStringDecoder`. Add a regression case that corrupts a `PLAIN` `BYTE_ARRAY` length in a page whose rows are all rejected by `PREWHERE` while other rows of the block pass, and expects `INCORRECT_DATA`. Verified that it fails without the fix. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cherry pick #131797 to 26.3: Bounds-check skipping fully filtered values in the Parquet `PLAIN` string decoder
… in the Parquet `PLAIN` string decoder
Backport #131797 to 26.10: Bounds-check skipping fully filtered values in the Parquet `PLAIN` string decoder
Backport #131797 to 26.8: Bounds-check skipping fully filtered values in the Parquet `PLAIN` string decoder
Backport #131797 to 26.3: Bounds-check skipping fully filtered values in the Parquet `PLAIN` string decoder
…red values in the Parquet `PLAIN` string decoder
Backport #131797 to 26.9: Bounds-check skipping fully filtered values in the Parquet `PLAIN` string decoder
When
PREWHEREfilters out every value of a page,PlainStringDecoder(with a non-trivial converter, e.g. readingGeometryfrom WKB) skipped the values with its own loop that did not check the lengths against the page size, so a malformed page could make it read out of bounds. Useskip, which checks them.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix a possible out-of-bounds read in the
Parquetreader whenPREWHEREfilters out a whole page of aPLAIN-encoded string column read through a conversion (e.g. toGeometry).🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131797]
Version info
26.11.1.2535-master(included in26.11and later)26.10.5.52,26.9.31.25,26.8.39.16,26.3.66.14