postgresql-14 (14.13-1.pgdg+1) sid-pgdg; urgency=medium

  * Rebuild for sid-pgdg.
  * Changes applied by generate-pgdg-source:
    + Moving lib packages to component 14.
    + Enabling cassert.

 -- PostgreSQL on Debian and Ubuntu <pgsql-pkg-debian@lists.postgresql.org>  Wed, 07 Aug 2024 16:07:37 +0200

postgresql-14 (14.13-1) unstable; urgency=medium

  * New upstream version.

    + Prevent unauthorized code execution during pg_dump (Masahiko Sawada)

      An attacker able to create and drop non-temporary objects could inject
      SQL code that would be executed by a concurrent pg_dump session with the
      privileges of the role running pg_dump (which is often a superuser).
      The attack involves replacing a sequence or similar object with a view
      or foreign table that will execute malicious code.  To prevent this,
      introduce a new server parameter restrict_nonsystem_relation_kind that
      can disable expansion of non-builtin views as well as access to foreign
      tables, and teach pg_dump to set it when available.  Note that the
      attack is prevented only if both pg_dump and the server it is dumping
      from are new enough to have this fix.

      The PostgreSQL Project thanks Noah Misch for reporting this problem.
      (CVE-2024-7348)

 -- Christoph Berg <myon@debian.org>  Wed, 07 Aug 2024 16:07:37 +0200

postgresql-14 (14.12-1) unstable; urgency=medium

  * New upstream version.

    + Restrict visibility of pg_stats_ext and pg_stats_ext_exprs entries to
      the table owner (Nathan Bossart)

      These views failed to hide statistics for expressions that involve
      columns the accessing user does not have permission to read.  View
      columns such as most_common_vals might expose security-relevant data.
      The potential interactions here are not fully clear, so in the interest
      of erring on the side of safety, make rows in these views visible only
      to the owner of the associated table.

      The PostgreSQL Project thanks Lukas Fittl for reporting this problem.
      (CVE-2024-4317)

      By itself, this fix will only fix the behavior in newly initdb'd
      database clusters.  If you wish to apply this change in an existing
      cluster, you will need to do the following:

        In each database of the cluster, run the fix-CVE-2024-4317.sql script
        as superuser. In psql this would look like
          \i /usr/share/postgresql/14/fix-CVE-2024-4317.sql
        Any error probably indicates that you've used the wrong script
        version.  It will not hurt to run the script more than once.

        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.  Do
        that with
          ALTER DATABASE template0 WITH ALLOW_CONNECTIONS true;
        and then after fixing template0, undo it with
          ALTER DATABASE template0 WITH ALLOW_CONNECTIONS false;

 -- Christoph Berg <myon@debian.org>  Tue, 07 May 2024 11:24:26 +0200

postgresql-14 (14.11-1) unstable; urgency=medium

  * New upstream version.

    * Tighten security restrictions within REFRESH MATERIALIZED VIEW
      CONCURRENTLY (Heikki Linnakangas)

      One step of a concurrent refresh command was run under weak security
      restrictions.  If a materialized view's owner could persuade a superuser
      or other high-privileged user to perform a concurrent refresh on that
      view, the view's owner could control code executed with the privileges
      of the user running REFRESH. Fix things so that all user-determined code
      is run as the view's owner, as expected.

      The PostgreSQL Project thanks Pedro Gallegos for reporting this problem.
      (CVE-2024-0985)

  * Restore relocatability of pg_config.
  * Build-Depend on libpq-dev when not building lib packages.

 -- Christoph Berg <myon@debian.org>  Tue, 06 Feb 2024 13:54:33 +0100

postgresql-14 (14.10-1) unstable; urgency=medium

  * New upstream version.

    * Fix handling of unknown-type arguments in DISTINCT "any" aggregate
      functions (Tom Lane)

      This error led to a text-type value being interpreted as an unknown-type
      value (that is, a zero-terminated string) at runtime.  This could result
      in disclosure of server memory following the text value.

      The PostgreSQL Project thanks Jingzhou Fu for reporting this problem.
      (CVE-2023-5868)

    * Detect integer overflow while computing new array dimensions
      (Tom Lane)

      When assigning new elements to array subscripts that are outside the
      current array bounds, an undetected integer overflow could occur in edge
      cases.  Memory stomps that are potentially exploitable for arbitrary
      code execution are possible, and so is disclosure of server memory.

      The PostgreSQL Project thanks Pedro Gallegos for reporting this problem.
      (CVE-2023-5869)

    * Prevent the pg_signal_backend role from signalling background workers
      and autovacuum processes (Noah Misch, Jelte Fennema-Nio)

      The documentation says that pg_signal_backend
      cannot issue signals to superuser-owned processes.  It was able to
      signal these background processes, though, because they advertise a
      role OID of zero.  Treat that as indicating superuser ownership.
      The security implications of cancelling one of these process types
      are fairly small so far as the core code goes (we'll just start
      another one), but extensions might add background workers that are
      more vulnerable.

      Also ensure that the is_superuser parameter is set correctly in such
      processes.  No specific security consequences are known for that
      oversight, but it might be significant for some extensions.

      The PostgreSQL Project thanks Hemanth Sandrana and Mahendrakar
      Srinivasarao for reporting this problem. (CVE-2023-5870)

    * Fix misbehavior during recursive page split in GiST index build
      (Heikki Linnakangas)

      Fix a case where the location of a page downlink was incorrectly
      tracked, and introduce some logic to allow recovering from such
      situations rather than silently doing the wrong thing.  This error could
      result in incorrect answers from subsequent index searches. It may be
      advisable to reindex all GiST indexes after installing this update.

    * Prevent de-duplication of btree index entries for interval columns

      There are interval values that are distinguishable but compare equal,
      for example 24:00:00 and 1 day.  This breaks assumptions made by btree
      de-duplication, so interval columns need to be excluded from
      de-duplication.  This oversight can cause incorrect results from
      index-only scans.  Moreover, after updating amcheck will report an error
      for almost all such indexes.  Users should reindex any btree indexes on
      interval columns.

  * Rebase debian/patches/libpgport-pkglibdir.

 -- Christoph Berg <myon@debian.org>  Tue, 07 Nov 2023 14:41:47 +0100

postgresql-14 (14.9-1) unstable; urgency=medium

  * New upstream version.

    + Disallow substituting a schema or owner name into an extension script if
      the name contains a quote, backslash, or dollar sign (Noah Misch)

      This restriction guards against SQL-injection hazards for trusted
      extensions.

      The PostgreSQL Project thanks Micah Gate, Valerie Woolard, Tim
      Carey-Smith, and Christoph Berg for reporting this problem.
      (CVE-2023-39417)

  * Test-Depend on tzdata-legacy | tzdata (<< 2023c-8).

 -- Christoph Berg <myon@debian.org>  Tue, 08 Aug 2023 10:16:19 +0200

postgresql-14 (14.8-1) unstable; urgency=medium

  * New upstream version.

    + Prevent CREATE SCHEMA from defeating changes in search_path
      (Report and fix by Alexander Lakhin, CVE-2023-2454)

      Within a CREATE SCHEMA command, objects in the prevailing search_path,
      as well as those in the newly-created schema, would be visible even
      within a called function or script that attempted to set a secure
      search_path.  This could allow any user having permission to create a
      schema to hijack the privileges of a security definer function or
      extension script.

    + Enforce row-level security policies correctly after inlining a
      set-returning function (Report by Wolfgang Walther, CVE-2023-2455)

      If a set-returning SQL-language function refers to a table having
      row-level security policies, and it can be inlined into a calling query,
      those RLS policies would not get enforced properly in some cases
      involving re-using a cached plan under a different role. This could
      allow a user to see or modify rows that should have been invisible.

  * Add Romanian debconf translation, mulțumesc Remus-Gabriel Chelu!
  * Fix update-alternatives when doc package is installed stand-alone.
  * Introduce build profile pkg.postgresql.nolibpkgs.
  * Reenable JIT on s390x using workaround patch from SUSE.

 -- Christoph Berg <myon@debian.org>  Tue, 09 May 2023 19:26:24 +0200

postgresql-14 (14.7-1) unstable; urgency=medium

  * New upstream version.

    + libpq can leak memory contents after GSSAPI transport encryption
      initiation fails (Jacob Champion)

      A modified server, or an unauthenticated man-in-the-middle, can send a
      not-zero-terminated error message during setup of GSSAPI (Kerberos)
      transport encryption.  libpq will then copy that string, as well as
      following bytes in application memory up to the next zero byte, to its
      error report. Depending on what the calling application does with the
      error report, this could result in disclosure of application memory
      contents.  There is also a small probability of a crash due to reading
      beyond the end of memory.  Fix by properly zero-terminating the server
      message. (CVE-2022-41862)

 -- Christoph Berg <myon@debian.org>  Tue, 07 Feb 2023 15:25:38 +0100

postgresql-14 (14.6-1) unstable; urgency=medium

  * New upstream version.

 -- Christoph Berg <myon@debian.org>  Tue, 08 Nov 2022 11:12:48 +0100

postgresql-14 (14.5-2) unstable; urgency=medium

  * Test-Depend on locales-all instead of locales.
  * Add Italian debconf translation by Ceppo, thanks! (Closes: #1019162)

 -- Christoph Berg <myon@debian.org>  Fri, 09 Sep 2022 22:23:26 +0200

postgresql-14 (14.5-1) unstable; urgency=medium

  * New upstream version.

    + Do not let extension scripts replace objects not already belonging to
      the extension (Tom Lane) (CVE-2022-2625)

      This change prevents extension scripts from doing CREATE OR REPLACE if
      there is an existing object that does not belong to the extension.  It
      also prevents CREATE IF NOT EXISTS in the same situation.  This prevents
      a form of trojan-horse attack in which a hostile database user could
      become the owner of an extension object and then modify it to compromise
      future uses of the object by other users.  As a side benefit, it also
      reduces the risk of accidentally replacing objects one did not mean to.

      The PostgreSQL Project thanks Sven Klemm for reporting this problem.

  * Update lintian overrides.

 -- Christoph Berg <myon@debian.org>  Wed, 10 Aug 2022 14:45:40 +0200

postgresql-14 (14.4-1) unstable; urgency=medium

  * New upstream release.

    + Prevent possible corruption of indexes created or rebuilt with the
      CONCURRENTLY option (Álvaro Herrera)

      An optimization added in v14 caused CREATE INDEX ... CONCURRENTLY and
      REINDEX ... CONCURRENTLY to sometimes miss indexing rows that were
      updated during the index build.  Revert that optimization. It is
      recommended that any indexes made with the CONCURRENTLY option be
      rebuilt after installing this update.  (Alternatively, rebuild them
      without CONCURRENTLY.)

 -- Christoph Berg <myon@debian.org>  Tue, 14 Jun 2022 09:49:41 +0200

postgresql-14 (14.3-1) unstable; urgency=medium

  * New upstream release.

    * Confine additional operations within security restricted operation
      sandboxes (Sergey Shinderuk, Noah Misch)

      Autovacuum, CLUSTER, CREATE INDEX, REINDEX, REFRESH MATERIALIZED VIEW,
      and pg_amcheck activated the security restricted operation protection
      mechanism too late, or even not at all in some code paths. A user having
      permission to create non-temporary objects within a database could
      define an object that would execute arbitrary SQL code with superuser
      permissions the next time that autovacuum processed the object, or that
      some superuser ran one of the affected commands against it.

      The PostgreSQL Project thanks Alexander Lakhin for reporting this
      problem. (CVE-2022-1552)

    * Fix default signature length for gist_ltree_ops indexes
      (Tomas Vondra, Alexander Korotkov)

      The default signature length (hash size) for GiST indexes on ltree
      columns was accidentally changed while upgrading that operator class to
      support operator class parameters. If any operations had been done on
      such an index without first upgrading the ltree extension to version
      1.2, they were done assuming that the signature length was 28 bytes
      rather than the intended 8.  This means it is very likely that such
      indexes are now corrupt.  For safety we recommend re-indexing all GiST
      indexes on ltree columns after installing this update.  (Note that GiST
      indexes on ltree[] columns, that is arrays of ltree, are not affected.)

 -- Christoph Berg <myon@debian.org>  Tue, 10 May 2022 10:34:28 +0200

postgresql-14 (14.2-1) unstable; urgency=medium

  * New upstream release.

 -- Christoph Berg <myon@debian.org>  Wed, 09 Feb 2022 10:39:43 +0100

postgresql-14 (14.1-5) unstable; urgency=medium

  * Provide postgresql-14-jit-llvm (= ${llvm:Version}) so extensions can
    depend on a matching llvm version.

 -- Christoph Berg <myon@debian.org>  Mon, 03 Jan 2022 16:08:18 +0100

postgresql-14 (14.1-4) unstable; urgency=medium

  [ Christoph Berg ]
  * Disable LLVM JIT on s390x for now. (See #1002029)

  [ Christian Ehrhardt ]
  * postgresql-common/server/postgresql.mk: avoid gcc 11 ICE on armhf and
    armel.

 -- Christoph Berg <myon@debian.org>  Mon, 20 Dec 2021 18:21:21 +0100

postgresql-14 (14.1-3) unstable; urgency=medium

  * Use system default clang/llvm version. (Closes: #1000915)
  * Use centralized debian/rules logic in postgresql-common.

 -- Christoph Berg <myon@debian.org>  Fri, 03 Dec 2021 09:56:49 +0100

postgresql-14 (14.1-2) unstable; urgency=medium

  * Enable outline-atomics on arm64 (affects Ubuntu focal only).

 -- Christoph Berg <myon@debian.org>  Tue, 16 Nov 2021 11:56:37 +0100

postgresql-14 (14.1-1) unstable; urgency=medium

  * New upstream release.

    + Make the server and libpq reject extraneous data after an SSL or GSS
      encryption handshake (Tom Lane)

      A man-in-the-middle with the ability to inject data into the TCP
      connection could stuff some cleartext data into the start of a
      supposedly encryption-protected database session.

      This could be abused to send faked SQL commands to the server, although
      that would only work if the server did not demand any authentication
      data.  (However, a server relying on SSL certificate authentication
      might well not do so.) (CVE-2021-23214)

      This could probably be abused to inject faked responses to the client's
      first few queries, although other details of libpq's behavior make that
      harder than it sounds.  A different line of attack is to exfiltrate the
      client's password, or other sensitive data that might be sent early in
      the session.  That has been shown to be possible with a server
      vulnerable to CVE-2021-23214. (CVE-2021-23222)

      The PostgreSQL Project thanks Jacob Champion for reporting these
      problems.

  * libpq-dev: Depend on libssl-dev, `pkg-config --exists libpq` requires it.

 -- Christoph Berg <myon@debian.org>  Fri, 05 Nov 2021 12:05:46 +0100

postgresql-14 (14.0-1) unstable; urgency=medium

  * First PG14 release.
  * Depend on postgresql-common 229 for scram-sha-256 authentication by
    default.

 -- Christoph Berg <myon@debian.org>  Tue, 28 Sep 2021 13:56:00 +0200

postgresql-14 (14~rc1-1) experimental; urgency=medium

  * First PG14 release candidate.
  * Enable spinlocks on riscv64.
  * Fix awk to be mawk, spotted by Yangfl. (Closes: #987786)
  * configure.ac: Remove check for autoconf 2.69.
  * Spanish debconf translation by Jonathan Bustillos, thanks!
    (Closes: #986775)
  * Flatten debian/*.lintian-overrides symlinks.

 -- Christoph Berg <myon@debian.org>  Thu, 23 Sep 2021 12:39:42 +0200

postgresql-14 (14~beta3-1) experimental; urgency=medium

  * New beta version.
  * libpq5.symbols: Add PQsendFlushRequest.

 -- Christoph Berg <myon@debian.org>  Tue, 10 Aug 2021 13:11:12 +0200

postgresql-14 (14~beta2-1) experimental; urgency=medium

  * New beta version.
  * libpq5.symbols: Add PQmblenBounded, PQsetTraceFlags, remove PQtraceSetFlags.
  * debian/tests/installcheck: Use --make-testtablespace-dir.

 -- Christoph Berg <myon@debian.org>  Wed, 23 Jun 2021 11:03:06 +0200

postgresql-14 (14~beta1-1) experimental; urgency=medium

  * New major upstream version 14; packaging based on postgresql-13.

 -- Christoph Berg <myon@debian.org>  Tue, 18 May 2021 13:40:56 +0200
