You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql/rls: prevent leak of hidden rows in RLS due to predicate reordering
RLS policies are applied as filters to scan operations before any
user-defined predicates. Previously, the optimizer could reorder these
predicates freely, which could result in information leakage: users
could infer the existence of hidden rows based on query behavior.
This change wraps the RLS filter in a Barrier operator, which prevents
it from being reordered across non-leak-proof expressions. This ensures
that evaluation order is preserved and RLS protections remain intact.
The Barrier is marked as permeable, allowing optgen rules to push the
Barrier up the plan tree for expressions that are leakproof. Only optgen
rules for the Select operator were added in this change. Subsequent
changes will handle joins and projections.
Informs #146952
Epic: CRDB-48807
Release note (bug fix): Fixed a security issue where optimizer
predicate reordering could leak information about hidden rows protected
by RLS policies.
0 commit comments