Last-minute updates for release notes.
authorTom Lane
Mon, 8 May 2017 16:57:27 +0000 (12:57 -0400)
committerTom Lane
Mon, 8 May 2017 16:57:27 +0000 (12:57 -0400)
Security: CVE-2017-7484, CVE-2017-7485, CVE-2017-7486

doc/src/sgml/release-9.2.sgml
doc/src/sgml/release-9.3.sgml
doc/src/sgml/release-9.4.sgml
doc/src/sgml/release-9.5.sgml
doc/src/sgml/release-9.6.sgml

index ea86c8a42d00c9fa7625970147651b9bcde35af1..62be52d09860e08f376310f13cc5e975af8b33c7 100644 (file)
    
 
    
-    However, if you are upgrading from a version earlier than 9.2.20,
+    However, if you use foreign data servers that make use of user
+    passwords for authentication, see the first changelog entry below.
+   
+
+   
+    Also, if you are upgrading from a version earlier than 9.2.20,
     see .
    
 
 
    
 
+    
+     
+      Restrict visibility
+      of pg_user_mappings.umoptions, to
+      protect passwords stored as user mapping options
+      (Michael Paquier, Feike Steenbergen)
+     
+
+     
+      The previous coding allowed the owner of a foreign server object,
+      or anyone he has granted server USAGE permission to,
+      to see the options for all user mappings associated with that server.
+      This might well include passwords for other users.
+      Adjust the view definition to match the behavior of
+      information_schema.user_mapping_options, namely that
+      these options are visible to the user being mapped, or if the mapping
+      is for PUBLIC and the current user is the server
+      owner, or if the current user is a superuser.
+      (CVE-2017-7486)
+     
+
+     
+      By itself, this patch will only fix the behavior in newly initdb'd
+      databases.  If you wish to apply this change in an existing database,
+      you will need to do the following:
+     
+
+     
+      
+       
+        Restart the postmaster after adding allow_system_table_mods
+        = true to postgresql.conf.  (In versions
+        supporting ALTER SYSTEM, you can use that to make the
+        configuration change, but you'll still need a restart.)
+       
+      
+
+      
+       
+        In each database of the cluster,
+        run the following commands as superuser:
+
+SET search_path = pg_catalog;
+CREATE OR REPLACE VIEW pg_user_mappings AS
+    SELECT
+        U.oid       AS umid,
+        S.oid       AS srvid,
+        S.srvname   AS srvname,
+        U.umuser    AS umuser,
+        CASE WHEN U.umuser = 0 THEN
+            'public'
+        ELSE
+            A.rolname
+        END AS usename,
+        CASE WHEN (U.umuser <> 0 AND A.rolname = current_user)
+                    OR (U.umuser = 0 AND pg_has_role(S.srvowner, 'USAGE'))
+                    OR (SELECT rolsuper FROM pg_authid WHERE rolname = current_user)
+                    THEN U.umoptions
+                 ELSE NULL END AS umoptions
+    FROM pg_user_mapping U
+         LEFT JOIN pg_authid A ON (A.oid = U.umuser) JOIN
+        pg_foreign_server S ON (U.umserver = S.oid);
+
+       
+      
+
+      
+       
+        Do not forget to include the template0
+        and template1 databases, or the vulnerability will still
+        exist in databases you create later.  To fix template0,
+        you'll need to temporarily make it accept connections.
+        In PostgreSQL 9.5 and later, you can use
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true;
+
+        and then after fixing template0, undo that with
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false;
+
+        In prior versions, instead use
+
+UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
+UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
+
+       
+      
+
+      
+       
+        Finally, remove the allow_system_table_mods configuration
+        setting, and again restart the postmaster.
+       
+      
+     
+    
+
+    
+     
+      Prevent exposure of statistical information via leaky operators
+      (Peter Eisentraut)
+     
+
+     
+      Some selectivity estimation functions in the planner will apply
+      user-defined operators to values obtained
+      from pg_statistic, such as most common values and
+      histogram entries.  This occurs before table permissions are checked,
+      so a nefarious user could exploit the behavior to obtain these values
+      for table columns he does not have permission to read.  To fix,
+      fall back to a default estimate if the operator's implementation
+      function is not certified leak-proof and the calling user does not have
+      permission to read the table column whose statistics are needed.
+      At least one of these criteria is satisfied in most cases in practice.
+      (CVE-2017-7484)
+     
+    
+
     
      
       Fix possible corruption of init forks of unlogged indexes
index 0bf5648be723070f170bd0bde6537aa0b11dbee7..c5a5342afc71db2a55dbc61a1270f630e079417e 100644 (file)
    
 
    
-    However, if you are upgrading from a version earlier than 9.3.16,
+    However, if you use foreign data servers that make use of user
+    passwords for authentication, see the first changelog entry below.
+   
+
+   
+    Also, if you are upgrading from a version earlier than 9.3.16,
     see .
    
 
 
    
 
+    
+     
+      Restrict visibility
+      of pg_user_mappings.umoptions, to
+      protect passwords stored as user mapping options
+      (Michael Paquier, Feike Steenbergen)
+     
+
+     
+      The previous coding allowed the owner of a foreign server object,
+      or anyone he has granted server USAGE permission to,
+      to see the options for all user mappings associated with that server.
+      This might well include passwords for other users.
+      Adjust the view definition to match the behavior of
+      information_schema.user_mapping_options, namely that
+      these options are visible to the user being mapped, or if the mapping
+      is for PUBLIC and the current user is the server
+      owner, or if the current user is a superuser.
+      (CVE-2017-7486)
+     
+
+     
+      By itself, this patch will only fix the behavior in newly initdb'd
+      databases.  If you wish to apply this change in an existing database,
+      you will need to do the following:
+     
+
+     
+      
+       
+        Restart the postmaster after adding allow_system_table_mods
+        = true to postgresql.conf.  (In versions
+        supporting ALTER SYSTEM, you can use that to make the
+        configuration change, but you'll still need a restart.)
+       
+      
+
+      
+       
+        In each database of the cluster,
+        run the following commands as superuser:
+
+SET search_path = pg_catalog;
+CREATE OR REPLACE VIEW pg_user_mappings AS
+    SELECT
+        U.oid       AS umid,
+        S.oid       AS srvid,
+        S.srvname   AS srvname,
+        U.umuser    AS umuser,
+        CASE WHEN U.umuser = 0 THEN
+            'public'
+        ELSE
+            A.rolname
+        END AS usename,
+        CASE WHEN (U.umuser <> 0 AND A.rolname = current_user)
+                    OR (U.umuser = 0 AND pg_has_role(S.srvowner, 'USAGE'))
+                    OR (SELECT rolsuper FROM pg_authid WHERE rolname = current_user)
+                    THEN U.umoptions
+                 ELSE NULL END AS umoptions
+    FROM pg_user_mapping U
+         LEFT JOIN pg_authid A ON (A.oid = U.umuser) JOIN
+        pg_foreign_server S ON (U.umserver = S.oid);
+
+       
+      
+
+      
+       
+        Do not forget to include the template0
+        and template1 databases, or the vulnerability will still
+        exist in databases you create later.  To fix template0,
+        you'll need to temporarily make it accept connections.
+        In PostgreSQL 9.5 and later, you can use
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true;
+
+        and then after fixing template0, undo that with
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false;
+
+        In prior versions, instead use
+
+UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
+UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
+
+       
+      
+
+      
+       
+        Finally, remove the allow_system_table_mods configuration
+        setting, and again restart the postmaster.
+       
+      
+     
+    
+
+    
+     
+      Prevent exposure of statistical information via leaky operators
+      (Peter Eisentraut)
+     
+
+     
+      Some selectivity estimation functions in the planner will apply
+      user-defined operators to values obtained
+      from pg_statistic, such as most common values and
+      histogram entries.  This occurs before table permissions are checked,
+      so a nefarious user could exploit the behavior to obtain these values
+      for table columns he does not have permission to read.  To fix,
+      fall back to a default estimate if the operator's implementation
+      function is not certified leak-proof and the calling user does not have
+      permission to read the table column whose statistics are needed.
+      At least one of these criteria is satisfied in most cases in practice.
+      (CVE-2017-7484)
+     
+    
+
+    
+     
+      Restore libpq's recognition of
+      the PGREQUIRESSL environment variable (Daniel Gustafsson)
+     
+
+     
+      Processing of this environment variable was unintentionally dropped
+      in PostgreSQL 9.3, but its documentation remained.
+      This creates a security hazard, since users might be relying on the
+      environment variable to force SSL-encrypted connections, but that
+      would no longer be guaranteed.  Restore handling of the variable,
+      but give it lower priority than PGSSLMODE, to avoid
+      breaking configurations that work correctly with post-9.3 code.
+      (CVE-2017-7485)
+     
+    
+
     
      
       Fix possible corruption of init forks of unlogged indexes
index 5bc6f68fd15933dfeeab62b4abaed70d06501a23..2835776d772e9ac222666de715e7719f650e5f58 100644 (file)
    
 
    
-    However, if you are using third-party replication tools that depend
-    on logical decoding, see the first changelog entry below.
+    However, if you use foreign data servers that make use of user
+    passwords for authentication, see the first changelog entry below.
+   
+
+   
+    Also, if you are using third-party replication tools that depend
+    on logical decoding, see the fourth changelog entry below.
    
 
    
 
    
 
+    
+     
+      Restrict visibility
+      of pg_user_mappings.umoptions, to
+      protect passwords stored as user mapping options
+      (Michael Paquier, Feike Steenbergen)
+     
+
+     
+      The previous coding allowed the owner of a foreign server object,
+      or anyone he has granted server USAGE permission to,
+      to see the options for all user mappings associated with that server.
+      This might well include passwords for other users.
+      Adjust the view definition to match the behavior of
+      information_schema.user_mapping_options, namely that
+      these options are visible to the user being mapped, or if the mapping
+      is for PUBLIC and the current user is the server
+      owner, or if the current user is a superuser.
+      (CVE-2017-7486)
+     
+
+     
+      By itself, this patch will only fix the behavior in newly initdb'd
+      databases.  If you wish to apply this change in an existing database,
+      you will need to do the following:
+     
+
+     
+      
+       
+        Restart the postmaster after adding allow_system_table_mods
+        = true to postgresql.conf.  (In versions
+        supporting ALTER SYSTEM, you can use that to make the
+        configuration change, but you'll still need a restart.)
+       
+      
+
+      
+       
+        In each database of the cluster,
+        run the following commands as superuser:
+
+SET search_path = pg_catalog;
+CREATE OR REPLACE VIEW pg_user_mappings AS
+    SELECT
+        U.oid       AS umid,
+        S.oid       AS srvid,
+        S.srvname   AS srvname,
+        U.umuser    AS umuser,
+        CASE WHEN U.umuser = 0 THEN
+            'public'
+        ELSE
+            A.rolname
+        END AS usename,
+        CASE WHEN (U.umuser <> 0 AND A.rolname = current_user)
+                    OR (U.umuser = 0 AND pg_has_role(S.srvowner, 'USAGE'))
+                    OR (SELECT rolsuper FROM pg_authid WHERE rolname = current_user)
+                    THEN U.umoptions
+                 ELSE NULL END AS umoptions
+    FROM pg_user_mapping U
+         LEFT JOIN pg_authid A ON (A.oid = U.umuser) JOIN
+        pg_foreign_server S ON (U.umserver = S.oid);
+
+       
+      
+
+      
+       
+        Do not forget to include the template0
+        and template1 databases, or the vulnerability will still
+        exist in databases you create later.  To fix template0,
+        you'll need to temporarily make it accept connections.
+        In PostgreSQL 9.5 and later, you can use
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true;
+
+        and then after fixing template0, undo that with
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false;
+
+        In prior versions, instead use
+
+UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
+UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
+
+       
+      
+
+      
+       
+        Finally, remove the allow_system_table_mods configuration
+        setting, and again restart the postmaster.
+       
+      
+     
+    
+
+    
+     
+      Prevent exposure of statistical information via leaky operators
+      (Peter Eisentraut)
+     
+
+     
+      Some selectivity estimation functions in the planner will apply
+      user-defined operators to values obtained
+      from pg_statistic, such as most common values and
+      histogram entries.  This occurs before table permissions are checked,
+      so a nefarious user could exploit the behavior to obtain these values
+      for table columns he does not have permission to read.  To fix,
+      fall back to a default estimate if the operator's implementation
+      function is not certified leak-proof and the calling user does not have
+      permission to read the table column whose statistics are needed.
+      At least one of these criteria is satisfied in most cases in practice.
+      (CVE-2017-7484)
+     
+    
+
+    
+     
+      Restore libpq's recognition of
+      the PGREQUIRESSL environment variable (Daniel Gustafsson)
+     
+
+     
+      Processing of this environment variable was unintentionally dropped
+      in PostgreSQL 9.3, but its documentation remained.
+      This creates a security hazard, since users might be relying on the
+      environment variable to force SSL-encrypted connections, but that
+      would no longer be guaranteed.  Restore handling of the variable,
+      but give it lower priority than PGSSLMODE, to avoid
+      breaking configurations that work correctly with post-9.3 code.
+      (CVE-2017-7485)
+     
+    
+
     
      
       Fix possibly-invalid initial snapshot during logical decoding
index b00b1e64eadaffca8c0e71c42d05c3526c2340fb..6a76463e78f132c13b9b46ff627f20b51a92f1ad 100644 (file)
    
 
    
-    However, if you are using third-party replication tools that depend
-    on logical decoding, see the first changelog entry below.
+    However, if you use foreign data servers that make use of user
+    passwords for authentication, see the first changelog entry below.
+   
+
+   
+    Also, if you are using third-party replication tools that depend
+    on logical decoding, see the fourth changelog entry below.
    
 
    
 
    
 
+    
+     
+      Restrict visibility
+      of pg_user_mappings.umoptions, to
+      protect passwords stored as user mapping options
+      (Michael Paquier, Feike Steenbergen)
+     
+
+     
+      The previous coding allowed the owner of a foreign server object,
+      or anyone he has granted server USAGE permission to,
+      to see the options for all user mappings associated with that server.
+      This might well include passwords for other users.
+      Adjust the view definition to match the behavior of
+      information_schema.user_mapping_options, namely that
+      these options are visible to the user being mapped, or if the mapping
+      is for PUBLIC and the current user is the server
+      owner, or if the current user is a superuser.
+      (CVE-2017-7486)
+     
+
+     
+      By itself, this patch will only fix the behavior in newly initdb'd
+      databases.  If you wish to apply this change in an existing database,
+      you will need to do the following:
+     
+
+     
+      
+       
+        Restart the postmaster after adding allow_system_table_mods
+        = true to postgresql.conf.  (In versions
+        supporting ALTER SYSTEM, you can use that to make the
+        configuration change, but you'll still need a restart.)
+       
+      
+
+      
+       
+        In each database of the cluster,
+        run the following commands as superuser:
+
+SET search_path = pg_catalog;
+CREATE OR REPLACE VIEW pg_user_mappings AS
+    SELECT
+        U.oid       AS umid,
+        S.oid       AS srvid,
+        S.srvname   AS srvname,
+        U.umuser    AS umuser,
+        CASE WHEN U.umuser = 0 THEN
+            'public'
+        ELSE
+            A.rolname
+        END AS usename,
+        CASE WHEN (U.umuser <> 0 AND A.rolname = current_user)
+                    OR (U.umuser = 0 AND pg_has_role(S.srvowner, 'USAGE'))
+                    OR (SELECT rolsuper FROM pg_authid WHERE rolname = current_user)
+                    THEN U.umoptions
+                 ELSE NULL END AS umoptions
+    FROM pg_user_mapping U
+         LEFT JOIN pg_authid A ON (A.oid = U.umuser) JOIN
+        pg_foreign_server S ON (U.umserver = S.oid);
+
+       
+      
+
+      
+       
+        Do not forget to include the template0
+        and template1 databases, or the vulnerability will still
+        exist in databases you create later.  To fix template0,
+        you'll need to temporarily make it accept connections.
+        In PostgreSQL 9.5 and later, you can use
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true;
+
+        and then after fixing template0, undo that with
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false;
+
+        In prior versions, instead use
+
+UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
+UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
+
+       
+      
+
+      
+       
+        Finally, remove the allow_system_table_mods configuration
+        setting, and again restart the postmaster.
+       
+      
+     
+    
+
+    
+     
+      Prevent exposure of statistical information via leaky operators
+      (Peter Eisentraut)
+     
+
+     
+      Some selectivity estimation functions in the planner will apply
+      user-defined operators to values obtained
+      from pg_statistic, such as most common values and
+      histogram entries.  This occurs before table permissions are checked,
+      so a nefarious user could exploit the behavior to obtain these values
+      for table columns he does not have permission to read.  To fix,
+      fall back to a default estimate if the operator's implementation
+      function is not certified leak-proof and the calling user does not have
+      permission to read the table column whose statistics are needed.
+      At least one of these criteria is satisfied in most cases in practice.
+      (CVE-2017-7484)
+     
+    
+
+    
+     
+      Restore libpq's recognition of
+      the PGREQUIRESSL environment variable (Daniel Gustafsson)
+     
+
+     
+      Processing of this environment variable was unintentionally dropped
+      in PostgreSQL 9.3, but its documentation remained.
+      This creates a security hazard, since users might be relying on the
+      environment variable to force SSL-encrypted connections, but that
+      would no longer be guaranteed.  Restore handling of the variable,
+      but give it lower priority than PGSSLMODE, to avoid
+      breaking configurations that work correctly with post-9.3 code.
+      (CVE-2017-7485)
+     
+    
+
     
      
       Fix possibly-invalid initial snapshot during logical decoding
index 1ec705c71b3dcc76ae050d033632e2a20c9a6191..b32826f2106fbd9724b671a52315af634187a8d3 100644 (file)
    
 
    
-    However, if you are using third-party replication tools that depend
-    on logical decoding, see the first changelog entry below.
+    However, if you use foreign data servers that make use of user
+    passwords for authentication, see the first changelog entry below.
+   
+
+   
+    Also, if you are using third-party replication tools that depend
+    on logical decoding, see the fourth changelog entry below.
    
 
    
 
     
 
+     
+      Restrict visibility
+      of pg_user_mappings.umoptions, to
+      protect passwords stored as user mapping options
+      (Michael Paquier, Feike Steenbergen)
+     
+
+     
+      The previous coding allowed the owner of a foreign server object,
+      or anyone he has granted server USAGE permission to,
+      to see the options for all user mappings associated with that server.
+      This might well include passwords for other users.
+      Adjust the view definition to match the behavior of
+      information_schema.user_mapping_options, namely that
+      these options are visible to the user being mapped, or if the mapping
+      is for PUBLIC and the current user is the server
+      owner, or if the current user is a superuser.
+      (CVE-2017-7486)
+     
+
+     
+      By itself, this patch will only fix the behavior in newly initdb'd
+      databases.  If you wish to apply this change in an existing database,
+      you will need to do the following:
+     
+
+     
+      
+       
+        Restart the postmaster after adding allow_system_table_mods
+        = true to postgresql.conf.  (In versions
+        supporting ALTER SYSTEM, you can use that to make the
+        configuration change, but you'll still need a restart.)
+       
+      
+
+      
+       
+        In each database of the cluster,
+        run the following commands as superuser:
+
+SET search_path = pg_catalog;
+CREATE OR REPLACE VIEW pg_user_mappings AS
+    SELECT
+        U.oid       AS umid,
+        S.oid       AS srvid,
+        S.srvname   AS srvname,
+        U.umuser    AS umuser,
+        CASE WHEN U.umuser = 0 THEN
+            'public'
+        ELSE
+            A.rolname
+        END AS usename,
+        CASE WHEN (U.umuser <> 0 AND A.rolname = current_user)
+                    OR (U.umuser = 0 AND pg_has_role(S.srvowner, 'USAGE'))
+                    OR (SELECT rolsuper FROM pg_authid WHERE rolname = current_user)
+                    THEN U.umoptions
+                 ELSE NULL END AS umoptions
+    FROM pg_user_mapping U
+         LEFT JOIN pg_authid A ON (A.oid = U.umuser) JOIN
+        pg_foreign_server S ON (U.umserver = S.oid);
+
+       
+      
+
+      
+       
+        Do not forget to include the template0
+        and template1 databases, or the vulnerability will still
+        exist in databases you create later.  To fix template0,
+        you'll need to temporarily make it accept connections.
+        In PostgreSQL 9.5 and later, you can use
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true;
+
+        and then after fixing template0, undo that with
+
+ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false;
+
+        In prior versions, instead use
+
+UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
+UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
+
+       
+      
+
+      
+       
+        Finally, remove the allow_system_table_mods configuration
+        setting, and again restart the postmaster.
+       
+      
+     
+    
+
+    
+
+     
+      Prevent exposure of statistical information via leaky operators
+      (Peter Eisentraut)
+     
+
+     
+      Some selectivity estimation functions in the planner will apply
+      user-defined operators to values obtained
+      from pg_statistic, such as most common values and
+      histogram entries.  This occurs before table permissions are checked,
+      so a nefarious user could exploit the behavior to obtain these values
+      for table columns he does not have permission to read.  To fix,
+      fall back to a default estimate if the operator's implementation
+      function is not certified leak-proof and the calling user does not have
+      permission to read the table column whose statistics are needed.
+      At least one of these criteria is satisfied in most cases in practice.
+      (CVE-2017-7484)
+     
+    
+
+    
+
+     
+      Restore libpq's recognition of
+      the PGREQUIRESSL environment variable (Daniel Gustafsson)
+     
+
+     
+      Processing of this environment variable was unintentionally dropped
+      in PostgreSQL 9.3, but its documentation remained.
+      This creates a security hazard, since users might be relying on the
+      environment variable to force SSL-encrypted connections, but that
+      would no longer be guaranteed.  Restore handling of the variable,
+      but give it lower priority than PGSSLMODE, to avoid
+      breaking configurations that work correctly with post-9.3 code.
+      (CVE-2017-7485)
+     
+    
+
+    
+