Fix cross-user data leak in system.asynchronous_inserts#100024
Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom Mar 20, 2026
Merged
Fix cross-user data leak in system.asynchronous_inserts#100024alexey-milovidov merged 1 commit intoClickHouse:masterfrom
system.asynchronous_inserts#100024alexey-milovidov merged 1 commit intoClickHouse:masterfrom
Conversation
Contributor
Contributor
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 92.86% (13/14, 0 noise lines excluded) |
alexey-milovidov
approved these changes
Mar 20, 2026
Member
alexey-milovidov
left a comment
There was a problem hiding this comment.
Thanks, the code is clear and well understandable.
This was referenced Mar 20, 2026
This was referenced Mar 20, 2026
This was referenced Mar 20, 2026
This was referenced Mar 20, 2026
This was referenced Mar 20, 2026
clickhouse-gh bot
added a commit
that referenced
this pull request
Mar 20, 2026
Backport #100024 to 25.12: Fix cross-user data leak in `system.asynchronous_inserts`
clickhouse-gh bot
added a commit
that referenced
this pull request
Mar 20, 2026
Backport #100024 to 26.1: Fix cross-user data leak in `system.asynchronous_inserts`
clickhouse-gh bot
added a commit
that referenced
this pull request
Mar 20, 2026
Backport #100024 to 26.3: Fix cross-user data leak in `system.asynchronous_inserts`
clickhouse-gh bot
added a commit
that referenced
this pull request
Mar 20, 2026
Backport #100024 to 25.8: Fix cross-user data leak in `system.asynchronous_inserts`
nikitamikhaylov
added a commit
that referenced
this pull request
Mar 31, 2026
Backport #100024 to 26.2: Fix cross-user data leak in `system.asynchronous_inserts`
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.
StorageSystemAsynchronousInserts::fillDataiterated over all asyncinsert queue entries with no user filtering, allowing any user with
SELECT ON system.asynchronous_insertsto see pending inserts belongingto other users (
query,database,table,entries.query_id, etc.).Fix: filter queue entries in
fillDataso that only the current user'sown entries are returned, unless the user has the
SHOW_USERSprivilege(which represents elevated visibility over user-related data).
The
InsertQuerystruct already carries auser_idfield populatedfrom
query_context->getUserID()at push time; this fix simplyconsults it during read.
just like system.query_cache (which has an explicit design comment justifying cross-user visibility)
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes