Skip to content

Fix row policy bypass via loop table function - #97682

Merged
alexey-milovidov merged 4 commits into
masterfrom
pufit/refactor-loop-table-function
Mar 1, 2026
Merged

alexey-milovidov merged 4 commits into
masterfrom
pufit/refactor-loop-table-function

Conversation

@pufit

@pufit pufit commented Feb 23, 2026 •

Copy link
Copy Markdown
Member

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):

The loop table function was calling inner_storage->read() directly, bypassing the interpreter layer where row policies, column-level grants, and other security checks are applied. This allowed a user restricted by row policies to read all rows via loop(table) even when a direct SELECT returned zero rows.

Version info

  • Merged into: 26.3.1.198 (included in 26.3 and later)
  • Backported to: 25.8.29.12

@clickhouse-gh

clickhouse-gh Bot commented Feb 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [817ce1b]

Summary: ✅

@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 23, 2026
@pufit
pufit marked this pull request as ready for review February 24, 2026 17:01
@yariks5s yariks5s self-assigned this Feb 25, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Mar 1, 2026
Merged via the queue into master with commit caf0e96 Mar 1, 2026
144 checks passed
@alexey-milovidov
alexey-milovidov deleted the pufit/refactor-loop-table-function branch March 1, 2026 04:45
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Mar 1, 2026
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 1, 2026
clickhouse-gh Bot added a commit that referenced this pull request Mar 1, 2026
Backport #97682 to 26.2: Fix row policy bypass via `loop` table function
alexey-milovidov added a commit that referenced this pull request Mar 1, 2026
…unction

Fix row policy bypass via `loop` table function
pufit added a commit that referenced this pull request Mar 4, 2026
Backport #97682 to 26.1: Fix row policy bypass via `loop` table function
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Mar 11, 2026
alexey-milovidov added a commit that referenced this pull request Mar 17, 2026
Backport #97682 to 25.12: Fix row policy bypass via `loop` table function
@robot-ch-test-poll robot-ch-test-poll removed the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jul 3, 2026
robot-ch-test-poll added a commit that referenced this pull request Jul 3, 2026
Cherry pick #97682 to 25.8: Fix row policy bypass via `loop` table function
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jul 3, 2026
tavplubix added a commit that referenced this pull request Jul 10, 2026
Backport #97682 to 25.8: Fix row policy bypass via `loop` table function
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 v25.12-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants