Validate Iceberg metadata file path for null bytes#100283
Merged
alexey-milovidov merged 2 commits intomasterfrom Mar 21, 2026
Merged
Validate Iceberg metadata file path for null bytes#100283alexey-milovidov merged 2 commits intomasterfrom
alexey-milovidov merged 2 commits intomasterfrom
Conversation
A null byte in the `iceberg_metadata_file_path` setting causes `std::length_error` in filesystem path operations. Since `std::length_error` is a `std::logic_error`, this triggers an abort in debug/sanitizer builds. Reject paths containing null bytes with a proper `BAD_ARGUMENTS` exception instead. Closes #96811 https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100176&sha=32a8de2243259ca5c69f22e0599aa41189972a69&name_0=PR&name_1=AST%20fuzzer%20%28amd_tsan%29 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Workflow [PR], commit [44401dd] Summary: ✅ AI ReviewSummaryThis PR validates ClickHouse Rules
Final Verdict
|
The null byte check throws `BAD_ARGUMENTS`, not `ICEBERG_SPECIFICATION_VIOLATION`. For a path with null byte in the middle (Test 3), the null byte check also fires first before any path resolution, so it's also `BAD_ARGUMENTS`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 87.50% (7/8, 0 noise lines excluded) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A null byte in the
iceberg_metadata_file_pathsetting causesstd::length_errorin filesystem path operations. Sincestd::length_erroris astd::logic_error, the exception handler inexecuteQuery.cpptreats it as a logical error and aborts the server in debug/sanitizer builds.Reject paths containing null bytes with a proper
BAD_ARGUMENTSexception instead.Closes #96811
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100176&sha=32a8de2243259ca5c69f22e0599aa41189972a69&name_0=PR&name_1=AST%20fuzzer%20%28amd_tsan%29
#100176
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix exception when Iceberg metadata file path setting contains a null byte.
Documentation entry for user-facing changes