pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reject CancelRequestPacket having unexpected length.
Date: Sat, 21 Jan 2023 14:12:19 +0000
Message-ID: <E1pJEbT-004muN-7Y@gemulon.postgresql.org> (raw)

Reject CancelRequestPacket having unexpected length.

When the length was too short, the server read outside the allocation.
That yielded the same log noise as sending the correct length with
(backendPID,cancelAuthCode) matching nothing.  Change to a message about
the unexpected length.  Given the attacker's lack of control over the
memory layout and the general lack of diversity in memory layouts at the
code in question, we doubt a would-be attacker could cause a segfault.
Hence, while the report arrived via security@postgresql.org, this is not
a vulnerability.  Back-patch to v11 (all supported versions).

Andrey Borodin, reviewed by Tom Lane.  Reported by Andrey Borodin.

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6900aea67e27990b72bc28b0b69096db9d226cba

Modified Files
--------------
src/backend/postmaster/postmaster.c | 7 +++++++
1 file changed, 7 insertions(+)



view thread (6+ messages)  latest in thread

Message-ID: <E1pJEbT-004muN-7Y@gemulon.postgresql.org>
Permalink:  ../E1pJEbT-004muN-7Y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pJEbT-004muN-7Y@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: noah@leadboat.com
  Subject: Re: pgsql: Reject CancelRequestPacket having unexpected length.
  In-Reply-To: <E1pJEbT-004muN-7Y@gemulon.postgresql.org>
  References: <E1pJEbT-004muN-7Y@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox