Skip to content

Fix SEGV in execute_query_fuzzer due to a nullptr TemporaryDataOnDiskScope - #95920

Merged
alexey-milovidov merged 4 commits into
masterfrom
fix-execute-query-fuzzer-segv
Feb 4, 2026
Merged

alexey-milovidov merged 4 commits into
masterfrom
fix-execute-query-fuzzer-segv

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Feb 3, 2026 •

Copy link
Copy Markdown
Member

The fuzzer crashed when ProcessList::insert tried to create a TemporaryDataOnDiskScope with a nullptr parent, because:

  1. The fuzzer never initialized temporary storage via setTemporaryStoragePath
  2. getSharedTempDataOnDisk() returned null
  3. The child constructor dereferenced null at parent->file_provider

Fix by:

  1. Adding nullptr check in ProcessListForUser before creating child scope
  2. Initializing temporary storage in the fuzzer like clickhouse-local does

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

See https://s3.amazonaws.com/clickhouse-test-reports/REFs/master/ea16f9975e4c7cf0264f18017cacb26a03c25180/libfuzzer_tests/execute_query_fuzzer/out.txt

This is only relevant to libFuzzer's fuzzer. No bug exists in the server.

Version info

  • Merged into: 26.2.1.232

alexey-milovidov and others added 3 commits February 4, 2026 00:39
The fuzzer crashed when `ProcessList::insert` tried to create a
`TemporaryDataOnDiskScope` with a null parent, because:
1. The fuzzer never initialized temporary storage via `setTemporaryStoragePath`
2. `getSharedTempDataOnDisk()` returned null
3. The child constructor dereferenced null at `parent->file_provider`

Fix by:
1. Adding null check in `ProcessListForUser` before creating child scope
2. Initializing temporary storage in the fuzzer like clickhouse-local does

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Feb 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [dd53f06]

Summary: ❌

job_name test_name status info comment
Stress test (amd_ubsan) failure
Logical error: Block structure mismatch in A stream: different number of columns: (STID: 0993-38e6) FAIL cidb, issue
AST fuzzer (amd_ubsan) failure
Logical error: RangeReader read A rows, but B expected. (STID: 4400-4987) FAIL cidb

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Feb 3, 2026
@yakov-olkhovskiy yakov-olkhovskiy self-assigned this Feb 4, 2026
@alexey-milovidov
alexey-milovidov merged commit 043cc05 into master Feb 4, 2026
130 of 133 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-execute-query-fuzzer-segv branch February 4, 2026 16:50
@yakov-olkhovskiy

Copy link
Copy Markdown
Member

@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 4, 2026
@KochetovNicolai KochetovNicolai added the post-approved Approved, but after the PR is merged. label Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

post-approved Approved, but after the PR is merged. pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants