aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts/common.c
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2019-05-06 11:38:43 +0100
committerDean Rasheed <dean.a.rasheed@gmail.com>2019-05-06 11:38:43 +0100
commit1aebfbea83c4a3e1a0aba4b0910135dc5a45666c (patch)
treee60c3f158bb1ad47ecd3253380a4986f0d31f2cf /src/bin/scripts/common.c
parentbd5e8b627bae9e394352a388d2ad30465eafea2c (diff)
downloadpostgresql-1aebfbea83c4a3e1a0aba4b0910135dc5a45666c.tar.gz
postgresql-1aebfbea83c4a3e1a0aba4b0910135dc5a45666c.zip
Fix security checks for selectivity estimation functions with RLS.
In commit e2d4ef8de8, security checks were added to prevent user-supplied operators from running over data from pg_statistic unless the user has table or column privileges on the table, or the operator is leakproof. For a table with RLS, however, checking for table or column privileges is insufficient, since that does not guarantee that the user has permission to view all of the column's data. Fix this by also checking for securityQuals on the RTE, and insisting that the operator be leakproof if there are any. Thus the leakproofness check will only be skipped if there are no securityQuals and the user has table or column privileges on the table -- i.e., only if we know that the user has access to all the data in the column. Back-patch to 9.5 where RLS was added. Dean Rasheed, reviewed by Jonathan Katz and Stephen Frost. Security: CVE-2019-10130
Diffstat (limited to 'src/bin/scripts/common.c')
0 files changed, 0 insertions, 0 deletions