2323 </para>
2424
2525 <para>
26- However, if you are upgrading from a version earlier than 10.2,
26+ However, if you run an installation in which not all users are mutually
27+ trusting, or if you maintain an application or extension that is
28+ intended for use in arbitrary situations, it is strongly recommended
29+ that you read the documentation changes described in the first changelog
30+ entry below, and take suitable steps to ensure that your installation or
31+ code is secure.
32+ </para>
33+
34+ <para>
35+ Also, the changes described in the second changelog entry below may
36+ cause functions used in index expressions or materialized views to fail
37+ during auto-analyze, or when reloading from a dump. After upgrading,
38+ monitor the server logs for such problems, and fix affected functions.
39+ </para>
40+
41+ <para>
42+ Also, if you are upgrading from a version earlier than 10.2,
2743 see <xref linkend="release-10-2"/>.
2844 </para>
2945 </sect2>
3551
3652 <listitem>
3753<!--
54+ Author: Noah Misch <noah@leadboat.com>
55+ Branch: master [5770172cb] 2018-02-26 07:39:44 -0800
56+ Branch: REL_10_STABLE [ee0d1966e] 2018-02-26 07:39:47 -0800
57+ Branch: REL9_6_STABLE [70396dbe3] 2018-02-26 07:39:48 -0800
58+ Branch: REL9_5_STABLE [1f47ea7b8] 2018-02-26 07:39:48 -0800
59+ Branch: REL9_4_STABLE [f28955e38] 2018-02-26 07:39:48 -0800
60+ Branch: REL9_3_STABLE [41ee473a4] 2018-02-26 07:39:48 -0800
61+ -->
62+ <para>
63+ Document how to configure installations and applications to guard
64+ against search-path-dependent trojan-horse attacks from other users
65+ (Noah Misch)
66+ </para>
67+
68+ <para>
69+ Using a <varname>search_path</varname> setting that includes any
70+ schemas writable by a hostile user enables that user to capture
71+ control of queries and then run arbitrary SQL code with the
72+ permissions of the attacked user. While it is possible to write
73+ queries that are proof against such hijacking, it is notationally
74+ tedious, and it's very easy to overlook holes. Therefore, we now
75+ recommend configurations in which no untrusted schemas appear in
76+ one's search path. Relevant documentation appears in
77+ <xref linkend="ddl-schemas-patterns"/> (for database administrators and users),
78+ <xref linkend="libpq-connect"/> (for application authors),
79+ <xref linkend="extend-extensions-style"/> (for extension authors), and
80+ <xref linkend="sql-createfunction"/> (for authors
81+ of <literal>SECURITY DEFINER</literal> functions).
82+ (CVE-2018-1058)
83+ </para>
84+ </listitem>
85+
86+ <listitem>
87+ <!--
88+ Author: Noah Misch <noah@leadboat.com>
89+ Branch: master [582edc369] 2018-02-26 07:39:44 -0800
90+ Branch: REL_10_STABLE [10d598354] 2018-02-26 07:39:47 -0800
91+ Branch: REL9_6_STABLE [e170b8c8c] 2018-02-26 07:39:48 -0800
92+ Branch: REL9_5_STABLE [91f3ffc52] 2018-02-26 07:39:48 -0800
93+ Branch: REL9_4_STABLE [928bca1a3] 2018-02-26 07:39:48 -0800
94+ Branch: REL9_3_STABLE [3db38b0ce] 2018-02-26 07:39:48 -0800
95+ Author: Noah Misch <noah@leadboat.com>
96+ Branch: REL9_4_STABLE [461c32b55] 2018-02-26 07:39:48 -0800
97+ Branch: REL9_3_STABLE [de8ffd666] 2018-02-26 07:39:48 -0800
98+ Author: Tom Lane <tgl@sss.pgh.pa.us>
99+ Branch: master [3d2aed664] 2018-02-26 10:18:21 -0500
100+ Branch: REL_10_STABLE [b8a2908f0] 2018-02-26 10:18:22 -0500
101+ Branch: REL9_6_STABLE [815172ba8] 2018-02-26 10:18:22 -0500
102+ Branch: REL9_5_STABLE [a8fc37a63] 2018-02-26 10:18:22 -0500
103+ Branch: REL9_4_STABLE [9f6e5296a] 2018-02-26 10:18:22 -0500
104+ Branch: REL9_3_STABLE [fe8b95b7e] 2018-02-26 10:18:22 -0500
105+ -->
106+ <para>
107+ Avoid use of insecure <varname>search_path</varname> settings
108+ in <application>pg_dump</application> and other client programs
109+ (Noah Misch, Tom Lane)
110+ </para>
111+
112+ <para>
113+ <application>pg_dump</application>,
114+ <application>pg_upgrade</application>,
115+ <application>vacuumdb</application> and
116+ other <productname>PostgreSQL</productname>-provided applications were
117+ themselves vulnerable to the type of hijacking described in the previous
118+ changelog entry; since these applications are commonly run by
119+ superusers, they present particularly attractive targets. To make them
120+ secure whether or not the installation as a whole has been secured,
121+ modify them to include only the <structname>pg_catalog</structname>
122+ schema in their <varname>search_path</varname> settings.
123+ Autovacuum worker processes now do the same, as well.
124+ </para>
125+
126+ <para>
127+ In cases where user-provided functions are indirectly executed by
128+ these programs — for example, user-provided functions in index
129+ expressions — the tighter <varname>search_path</varname> may
130+ result in errors, which will need to be corrected by adjusting those
131+ user-provided functions to not assume anything about what search path
132+ they are invoked under. That has always been good practice, but now
133+ it will be necessary for correct behavior.
134+ (CVE-2018-1058)
135+ </para>
136+ </listitem>
137+
138+ <listitem>
139+ <!--
38140Author: Peter Eisentraut <peter_e@gmx.net>
39141Branch: master [bc1adc651] 2018-02-23 22:13:21 -0500
40142Branch: REL_10_STABLE [b9bf23abb] 2018-02-23 22:09:26 -0500
@@ -50,8 +152,6 @@ Branch: REL_10_STABLE [b9bf23abb] 2018-02-23 22:09:26 -0500
50152 and <structname>information_schema</structname> tables, which are
51153 supposed to be omitted from the change stream.
52154 </para>
53- <para>
54- </para>
55155 </listitem>
56156
57157 <listitem>
0 commit comments