Skip to content

fix a possible use after free in StorageKafka2::activate()#97520

Merged
alexey-milovidov merged 2 commits intomasterfrom
ncb/fix-97495
Feb 22, 2026
Merged

fix a possible use after free in StorageKafka2::activate()#97520
alexey-milovidov merged 2 commits intomasterfrom
ncb/fix-97495

Conversation

@bharatnc
Copy link
Contributor

When the ZooKeeper session expires, partialShutdown was not resetting replica_is_active_node, so the old EphemeralNodeHolder would get destroyed after setZooKeeper had already freed the old session, causing a segfault.

Closes: #97495

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC) or LOGICAL_ERROR

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix a possible use after free in StorageKafka2.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh
Copy link
Contributor

clickhouse-gh bot commented Feb 20, 2026

Workflow [PR], commit [a2b94f6]

Summary:

job_name test_name status info comment
BuzzHouse (amd_ubsan) failure
Logical error: Digest does not match (STID: 5029-4dec) FAIL cidb, issue
Finish Workflow failure
python3 ./ci/jobs/scripts/workflow_hooks/new_tests_check.py failure

@clickhouse-gh clickhouse-gh bot added pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! labels Feb 20, 2026
@alexey-milovidov alexey-milovidov self-assigned this Feb 20, 2026
@bharatnc
Copy link
Contributor Author

Failure Finish Workflow

 Run command [gh pr view 97520 --json title,body,labels --repo ClickHouse/ClickHouse]
No new tests have been added

But I don't think it's easy to add a test for this.

@alexey-milovidov
Copy link
Member

I've relaxed this rule: #97565
Only need to provide a link to CI report.

@alexey-milovidov alexey-milovidov merged commit 1d9aa9a into master Feb 22, 2026
144 of 148 checks passed
@alexey-milovidov alexey-milovidov deleted the ncb/fix-97495 branch February 22, 2026 12:37
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 22, 2026
@robot-clickhouse robot-clickhouse added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Feb 22, 2026
robot-ch-test-poll4 added a commit that referenced this pull request Feb 22, 2026
Cherry pick #97520 to 25.3: fix a possible use after free in StorageKafka2::activate()
robot-clickhouse added a commit that referenced this pull request Feb 22, 2026
robot-ch-test-poll4 added a commit that referenced this pull request Feb 22, 2026
Cherry pick #97520 to 25.8: fix a possible use after free in StorageKafka2::activate()
robot-clickhouse added a commit that referenced this pull request Feb 22, 2026
robot-ch-test-poll4 added a commit that referenced this pull request Feb 22, 2026
Cherry pick #97520 to 25.11: fix a possible use after free in StorageKafka2::activate()
robot-clickhouse added a commit that referenced this pull request Feb 22, 2026
robot-ch-test-poll4 added a commit that referenced this pull request Feb 22, 2026
Cherry pick #97520 to 25.12: fix a possible use after free in StorageKafka2::activate()
robot-clickhouse added a commit that referenced this pull request Feb 22, 2026
robot-ch-test-poll4 added a commit that referenced this pull request Feb 22, 2026
Cherry pick #97520 to 26.1: fix a possible use after free in StorageKafka2::activate()
robot-clickhouse added a commit that referenced this pull request Feb 22, 2026
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Feb 22, 2026
clickhouse-gh bot added a commit that referenced this pull request Feb 22, 2026
Backport #97520 to 25.12: fix a possible use after free in StorageKafka2::activate()
clickhouse-gh bot added a commit that referenced this pull request Feb 22, 2026
Backport #97520 to 25.11: fix a possible use after free in StorageKafka2::activate()
clickhouse-gh bot added a commit that referenced this pull request Feb 22, 2026
Backport #97520 to 25.8: fix a possible use after free in StorageKafka2::activate()
Algunenano pushed a commit to Algunenano/ClickHouse that referenced this pull request Feb 24, 2026
fix a possible use after free in StorageKafka2::activate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR 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.

Segmentation fault (STID: 2468-4b95)

4 participants