Add missing checks to some of pageinspect's BRIN functions
Add missing checks to some of pageinspect's BRIN functions

brin_page_type() and brin_metapage_info() did not enforce being called
by superuser, like other pageinspect functions that take bytea do.
Since they don't verify the passed page thoroughly, it is possible to
use them to read the server memory with a carefully crafted bytea value,
up to a file kilobytes from where the input bytea is located.

Have them throw errors if called by a non-superuser.

Report and initial patch: Andreas Seltenreich

Security: CVE-2016-3065

greenplum-db/gpdb,adam8157/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,50wu/gpdb,50wu/gpdb,ashwinstar/gpdb,adam8157/gpdb,ashwinstar/gpdb,xinzweb/gpdb,lisakowen/gpdb,adam8157/gpdb,xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,jmcatamney/gpdb,lisakowen/gpdb,ashwinstar/gpdb,lisakowen/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb,greenplum-db/gpdb,lisakowen/gpdb,50wu/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,ashwinstar/gpdb,adam8157/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,lisakowen/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,50wu/gpdb,50wu/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,lisakowen/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,adam8157/gpdb