pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix security checks for selectivity estimation functions with RL
5+ messages / 1 participants
[nested] [flat]

* pgsql: Fix security checks for selectivity estimation functions with RL
@ 2019-05-06 10:50 Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Dean Rasheed @ 2019-05-06 10:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1aebfbea83c4a3e1a0aba4b0910135dc5a45666c

Modified Files
--------------
src/backend/utils/adt/selfuncs.c          | 21 +++++++++++++++------
src/test/regress/expected/rowsecurity.out | 21 +++++++++++++++++++++
src/test/regress/sql/rowsecurity.sql      | 20 ++++++++++++++++++++
3 files changed, 56 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix security checks for selectivity estimation functions with RL
@ 2019-05-06 10:50 Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Dean Rasheed @ 2019-05-06 10:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0027ee3c52d824764f7f8391edb2695c3d2b424f

Modified Files
--------------
src/backend/utils/adt/selfuncs.c          | 21 +++++++++++++++------
src/test/regress/expected/rowsecurity.out | 21 +++++++++++++++++++++
src/test/regress/sql/rowsecurity.sql      | 20 ++++++++++++++++++++
3 files changed, 56 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix security checks for selectivity estimation functions with RL
@ 2019-05-06 10:50 Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Dean Rasheed @ 2019-05-06 10:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9408028305ac86d9913eaea49442cd7fdfa8aaca

Modified Files
--------------
src/backend/utils/adt/selfuncs.c          | 21 +++++++++++++++------
src/test/regress/expected/rowsecurity.out | 21 +++++++++++++++++++++
src/test/regress/sql/rowsecurity.sql      | 20 ++++++++++++++++++++
3 files changed, 56 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix security checks for selectivity estimation functions with RL
@ 2019-05-06 10:50 Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Dean Rasheed @ 2019-05-06 10:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/085d64d9d236315dd646f42e195f822aeb15c54e

Modified Files
--------------
src/backend/utils/adt/selfuncs.c          | 21 +++++++++++++++------
src/test/regress/expected/rowsecurity.out | 21 +++++++++++++++++++++
src/test/regress/sql/rowsecurity.sql      | 20 ++++++++++++++++++++
3 files changed, 56 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Fix security checks for selectivity estimation functions with RL
@ 2019-05-06 10:50 Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Dean Rasheed @ 2019-05-06 10:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/93c36145ad10f3b4795d8e411720ae55180ad274

Modified Files
--------------
src/backend/utils/adt/selfuncs.c          | 21 +++++++++++++++------
src/test/regress/expected/rowsecurity.out | 21 +++++++++++++++++++++
src/test/regress/sql/rowsecurity.sql      | 21 +++++++++++++++++++++
3 files changed, 57 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2019-05-06 10:50 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 10:50 pgsql: Fix security checks for selectivity estimation functions with RL Dean Rasheed <dean.a.rasheed@gmail.com>
2019-05-06 10:50 pgsql: Fix security checks for selectivity estimation functions with RL Dean Rasheed <dean.a.rasheed@gmail.com>
2019-05-06 10:50 pgsql: Fix security checks for selectivity estimation functions with RL Dean Rasheed <dean.a.rasheed@gmail.com>
2019-05-06 10:50 pgsql: Fix security checks for selectivity estimation functions with RL Dean Rasheed <dean.a.rasheed@gmail.com>
2019-05-06 10:50 pgsql: Fix security checks for selectivity estimation functions with RL Dean Rasheed <dean.a.rasheed@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox