Repository navigation
Fix null pointer dereference in DataTypeFunction::updateHashImpl - #96479
Merged
Merged
Conversation
`DataTypeFunction` can have null argument types when the lambda is not yet resolved (e.g. created via `DataTypes(lambda_arguments_size, nullptr)` in `resolveFunction`). The `doGetName` method already handled this with a null check, but `updateHashImpl` did not, causing a null pointer dereference found by AST fuzzer with UBSan. Also hash null/non-null markers to avoid collisions between types with different null patterns. https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=b9e68f4b9b0b33c7db43b00afb3eff4ff2050694&name_0=MasterCI&name_1=AST%20fuzzer%20%28amd_ubsan%29 Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
|
Workflow [PR], commit [7022918] Summary: ❌
|
robot-clickhouse
added a commit
that referenced
this pull request
Feb 10, 2026
…ction::updateHashImpl`
robot-clickhouse
added a commit
that referenced
this pull request
Feb 10, 2026
…nction::updateHashImpl`
robot-clickhouse
added a commit
that referenced
this pull request
Feb 10, 2026
…nction::updateHashImpl`
robot-clickhouse
added a commit
that referenced
this pull request
Feb 10, 2026
…ction::updateHashImpl`
alexey-milovidov
added a commit
that referenced
this pull request
Mar 17, 2026
Backport #96479 to 26.1: Fix null pointer dereference in `DataTypeFunction::updateHashImpl`
alexey-milovidov
added a commit
that referenced
this pull request
Mar 17, 2026
Backport #96479 to 25.12: Fix null pointer dereference in `DataTypeFunction::updateHashImpl`
alexey-milovidov
added a commit
that referenced
this pull request
Mar 17, 2026
Backport #96479 to 25.8: Fix null pointer dereference in `DataTypeFunction::updateHashImpl`
groeneai
added a commit
to groeneai/ClickHouse
that referenced
this pull request
Jun 2, 2026
The new unresolved-lambda-placeholder pre-pass in `QueryAnalyzer::resolveFunction` (commits 14d5ddb and 32a2575) fires earlier than the downstream `NUMBER_OF_ARGUMENTS_DOESNT_MATCH` that the original null-arg-types guard from PR ClickHouse#96479 produced. The third `arrayFold` argument in this regression query is a lambda used as the initial accumulator (a value slot), which is now rejected upstream with the more semantically accurate `ILLEGAL_TYPE_OF_ARGUMENT` error ("does not expect a lambda expression as argument N"). CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106271&sha=02cfedf7885d75af9f9bb520923f28fa6d860a1c PR: ClickHouse#106271
Closed
1 task
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.
DataTypeFunctioncan have null argument types when the lambda is not yet resolved (e.g. created viaDataTypes(lambda_arguments_size, nullptr)inresolveFunction). ThedoGetNamemethod already handled this with a null check, butupdateHashImpldid not, causing a null pointer dereference found by AST fuzzer with UBSan.Also hash null/non-null markers to avoid collisions between types with different null patterns.
https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=b9e68f4b9b0b33c7db43b00afb3eff4ff2050694&name_0=MasterCI&name_1=AST%20fuzzer%20%28amd_ubsan%29
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix null pointer dereference in certain expressions with lambda functions.
Version info
26.2.1.50726.1.5.32,25.12.9.36,25.8.19.14