postgresql/src/backend
Peter Eisentraut c33c423622 Add security checks to selectivity estimation functions
Some selectivity estimation functions run user-supplied operators over
data obtained from pg_statistic without security checks, which allows
those operators to leak pg_statistic data without having privileges on
the underlying tables.  Fix by checking that one of the following is
satisfied: (1) the user has table or column privileges on the table
underlying the pg_statistic data, or (2) the function implementing the
user-supplied operator is leak-proof.  If neither is satisfied, planning
will proceed as if there are no statistics available.

At least one of these is satisfied in most cases in practice.  The only
situations that are negatively impacted are user-defined or
not-leak-proof operators on a security-barrier view.

Reported-by: Robert Haas <robertmhaas@gmail.com>
Author: Peter Eisentraut <peter_e@gmx.net>
Author: Tom Lane <tgl@sss.pgh.pa.us>

Security: CVE-2017-7484
2017-05-08 09:18:57 -04:00
..
access Fix pfree-of-already-freed-tuple when rescanning a GiST index-only scan. 2017-05-04 13:59:13 -04:00
bootstrap Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
catalog Fix compiler warning 2017-04-16 20:49:40 -04:00
commands Ensure commands in extension scripts see the results of preceding DDL. 2017-05-02 18:05:54 -04:00
executor Avoid passing function pointers across process boundaries. 2017-04-15 16:23:27 -04:00
foreign Remove GetUserMappingId() and GetUserMappingById(). 2016-07-22 11:32:23 -04:00
lib Revert "Permit dump/reload of not-too-large >1GB tuples" 2016-12-06 12:46:03 -03:00
libpq Fix unportable disregard of alignment requirements in RADIUS code. 2017-03-26 17:35:35 -04:00
main Repair a bit of pgindent damage. 2016-06-09 18:09:17 -04:00
nodes Fix parallel query so it doesn't spoil row estimates above Gather. 2017-03-31 21:10:30 -04:00
optimizer Always build a custom plan node's targetlist from the path's pathtarget. 2017-04-17 15:29:00 -04:00
parser Fix YA unwanted behavioral difference with operator_precedence_warning. 2017-02-15 14:44:00 -05:00
po Translation updates 2017-02-06 12:42:47 -05:00
port Provide a way to control SysV shmem attach address in EXEC_BACKEND builds. 2017-04-15 17:27:51 -04:00
postmaster Allow multiple bgworkers to be launched per postmaster iteration. 2017-04-26 16:17:29 -04:00
regex Fix regexport.c to behave sanely with lookaround constraints. 2017-04-13 17:18:35 -04:00
replication Don't use on-disk snapshots for exported logical decoding snapshot. 2017-04-27 15:29:33 -07:00
rewrite RLS: Fix ALL vs. SELECT+UPDATE policy usage 2017-05-06 21:46:41 -04:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Cope with glibc too old to have epoll_create1(). 2017-04-27 17:13:54 -04:00
tcop Remove dead code and fix comments in fast-path function handling. 2017-04-06 09:11:11 +03:00
tsearch Fix typos in comments. 2017-02-06 11:34:15 +02:00
utils Add security checks to selectivity estimation functions 2017-05-08 09:18:57 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Provide and use a makefile target to build all generated headers. 2016-07-01 15:09:02 -04:00
nls.mk Translation updates 2017-02-06 12:42:47 -05:00