Skip to content

Commit b771270

Browse files
committed
Last-minute updates for release notes.
Security: CVE-2024-4317
1 parent c342538 commit b771270

File tree

1 file changed

+94
-1
lines changed

1 file changed

+94
-1
lines changed

doc/src/sgml/release-14.sgml

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,16 @@
2323
</para>
2424

2525
<para>
26-
However, if you are upgrading from a version earlier than 14.11,
26+
However, a security vulnerability was found in the system
27+
views <structname>pg_stats_ext</structname>
28+
and <structname>pg_stats_ext_exprs</structname>, potentially allowing
29+
authenticated database users to see data they shouldn't. If this is
30+
of concern in your installation, follow the steps in the first
31+
changelog entry below to rectify it.
32+
</para>
33+
34+
<para>
35+
Also, if you are upgrading from a version earlier than 14.11,
2736
see <xref linkend="release-14-11"/>.
2837
</para>
2938
</sect2>
@@ -35,6 +44,90 @@
3544

3645
<listitem>
3746
<!--
47+
Author: Nathan Bossart <nathan@postgresql.org>
48+
Branch: master [521a7156a] 2024-05-06 09:00:00 -0500
49+
Branch: REL_16_STABLE [2485a85e9] 2024-05-06 09:00:07 -0500
50+
Branch: REL_15_STABLE [9cc2b6289] 2024-05-06 09:00:13 -0500
51+
Branch: REL_14_STABLE [c3425383b] 2024-05-06 09:00:19 -0500
52+
-->
53+
<para>
54+
Restrict visibility of <structname>pg_stats_ext</structname> and
55+
<structname>pg_stats_ext_exprs</structname> entries to the table
56+
owner (Nathan Bossart)
57+
</para>
58+
59+
<para>
60+
These views failed to hide statistics for expressions that involve
61+
columns the accessing user does not have permission to read. View
62+
columns such as <structfield>most_common_vals</structfield> might
63+
expose security-relevant data. The potential interactions here are
64+
not fully clear, so in the interest of erring on the side of safety,
65+
make rows in these views visible only to the owner of the associated
66+
table.
67+
</para>
68+
69+
<para>
70+
The <productname>PostgreSQL</productname> Project thanks
71+
Lukas Fittl for reporting this problem.
72+
(CVE-2024-4317)
73+
</para>
74+
75+
<para>
76+
By itself, this fix will only fix the behavior in newly initdb'd
77+
database clusters. If you wish to apply this change in an existing
78+
cluster, you will need to do the following:
79+
</para>
80+
81+
<procedure>
82+
<step>
83+
<para>
84+
Find the SQL script <filename>fix-CVE-2024-4317.sql</filename> in
85+
the <replaceable>share</replaceable> directory of
86+
the <productname>PostgreSQL</productname> installation (typically
87+
located someplace like <filename>/usr/share/postgresql/</filename>).
88+
Be sure to use the script appropriate to
89+
your <productname>PostgreSQL</productname> major version.
90+
If you do not see this file, either your version is not vulnerable
91+
(only v14&ndash;v16 are affected) or your minor version is too
92+
old to have the fix.
93+
</para>
94+
</step>
95+
96+
<step>
97+
<para>
98+
In <emphasis>each</emphasis> database of the cluster, run
99+
the <filename>fix-CVE-2024-4317.sql</filename> script as superuser.
100+
In <application>psql</application> this would look like
101+
<programlisting>
102+
\i /usr/share/postgresql/fix-CVE-2024-4317.sql
103+
</programlisting>
104+
(adjust the file path as appropriate). Any error probably indicates
105+
that you've used the wrong script version. It will not hurt to run
106+
the script more than once.
107+
</para>
108+
</step>
109+
110+
<step>
111+
<para>
112+
Do not forget to include the <literal>template0</literal>
113+
and <literal>template1</literal> databases, or the vulnerability
114+
will still exist in databases you create later. To
115+
fix <literal>template0</literal>, you'll need to temporarily make
116+
it accept connections. Do that with
117+
<programlisting>
118+
ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true;
119+
</programlisting>
120+
and then after fixing <literal>template0</literal>, undo it with
121+
<programlisting>
122+
ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false;
123+
</programlisting>
124+
</para>
125+
</step>
126+
</procedure>
127+
</listitem>
128+
129+
<listitem>
130+
<!--
38131
Author: Tom Lane <tgl@sss.pgh.pa.us>
39132
Branch: master [b4a71cf65] 2024-03-14 14:57:16 -0400
40133
Branch: REL_16_STABLE [52898c63e] 2024-03-14 14:57:16 -0400

0 commit comments

Comments
 (0)