Noah Misch 582edc369c Empty search_path in Autovacuum and non-psql/pgbench clients.
This makes the client programs behave as documented regardless of the
connect-time search_path and regardless of user-created objects.  Today,
a malicious user with CREATE permission on a search_path schema can take
control of certain of these clients' queries and invoke arbitrary SQL
functions under the client identity, often a superuser.  This is
exploitable in the default configuration, where all users have CREATE
privilege on schema "public".

This changes behavior of user-defined code stored in the database, like
pg_index.indexprs and pg_extension_config_dump().  If they reach code
bearing unqualified names, "does not exist" or "no schema has been
selected to create in" errors might appear.  Users may fix such errors
by schema-qualifying affected names.  After upgrading, consider watching
server logs for these errors.

The --table arguments of src/bin/scripts clients have been lax; for
example, "vacuumdb -Zt pg_am\;CHECKPOINT" performed a checkpoint.  That
now fails, but for now, "vacuumdb -Zt 'pg_am(amname);CHECKPOINT'" still
performs a checkpoint.

Back-patch to 9.3 (all supported versions).

Reviewed by Tom Lane, though this fix strategy was not his first choice.
Reported by Arseniy Sharoglazov.

Security: CVE-2018-1058
2018-02-26 07:39:44 -08:00
..
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2017-06-21 15:35:54 -04:00
2017-09-19 15:31:37 -04:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2017-09-14 22:22:59 -04:00
2017-11-08 11:37:28 -05:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-01-29 20:41:36 -05:00
2017-06-21 15:35:54 -04:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2018-01-02 23:30:12 -05:00
2017-06-21 15:35:54 -04:00
2017-09-22 11:49:48 -04:00

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.