Repository navigation
Reject repeated paths in serialized states of mergedJSONPatch - #131792
Conversation
A serialized state of `mergedJSONPatch` could contain the same path several times: `insertBatchAtomic` compares the entries of a batch only with the entries that existed before. `insertResultInto` then inserted every copy into the column of the path while adding one row to the `JSON` column, so the subcolumns got different sizes and later functions read out of bounds. `serialize` writes the paths sorted and without duplicates, so reject a state whose paths are not strictly increasing with `INCORRECT_DATA`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [22c53a5] Summary: ✅
AI ReviewSummaryThe PR rejects duplicate or out-of-order paths in serialized 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 Object file sizes3 object files changed (+16.15 KiB total), 0 added.
711 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units7 translation units recompiled, 18 s compile time in total, 7 of them have a recent master baseline. |
…state `deserialize` called `reserve` with the number of entries read from the state, so a corrupted state with a huge count threw `std::length_error`, which is reported as a logical error. Found by the AST fuzzer: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=131792&sha=2e1fab66729fa33046e440329ef660e7bfda6475&name_0=PR&name_1=AST%20fuzzer%20%28amd_debug%2C%20targeted%29 #131792 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Backport #131792 to 26.9: Reject repeated paths in serialized states of `mergedJSONPatch`
Backport #131792 to 26.10: Reject repeated paths in serialized states of `mergedJSONPatch`
Backport #131792 to 26.8: Reject repeated paths in serialized states of `mergedJSONPatch`
…ed states of `mergedJSONPatch`
A serialized state of
mergedJSONPatchcould contain the same path several times:insertBatchAtomiccompares the entries of a batch only with the entries that existed before.insertResultIntothen inserted every copy into the column of the path while adding one row to theJSONcolumn, so the subcolumns got different sizes and later functions read out of bounds.serializewrites the paths sorted and without duplicates, so reject a state whose paths are not strictly increasing withINCORRECT_DATA.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix out-of-bounds memory access with a state of
mergedJSONPatchcontaining a repeated path. Now such a state is rejected withINCORRECT_DATA.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131792]
Version info
26.11.1.2533-master(included in26.11and later)26.10.5.51,26.9.31.16,26.8.39.15