Skip to content

Commit c2e5f4d

Browse files
committed
Make wal_compression PGC_SUSET rather than PGC_USERSET.
When enabling wal_compression, there is a risk to leak data similarly to the BREACH and CRIME attacks on SSL where the compression ratio of a full page image gives a hint of what is the existing data of this page. This vulnerability is quite cumbersome to exploit in practice, but doable. So this patch makes wal_compression PGC_SUSET in order to prevent non-superusers from enabling it and exploiting the vulnerability while DBA thinks the risk very seriously and disables it in postgresql.conf. Back-patch to 9.5 where wal_compression was introduced.
1 parent 23b8928 commit c2e5f4d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/src/sgml/config.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,6 +2303,7 @@ include_dir 'conf.d'
23032303
<xref linkend="guc-full-page-writes"> is on or during a base backup.
23042304
A compressed page image will be decompressed during WAL replay.
23052305
The default value is <literal>off</>.
2306+
Only superusers can change this setting.
23062307
</para>
23072308

23082309
<para>

src/backend/utils/misc/guc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ static struct config_bool ConfigureNamesBool[] =
995995
},
996996

997997
{
998-
{"wal_compression", PGC_USERSET, WAL_SETTINGS,
998+
{"wal_compression", PGC_SUSET, WAL_SETTINGS,
999999
gettext_noop("Compresses full-page writes written in WAL file."),
10001000
NULL
10011001
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy