agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pgcrypto: avoid recursive ResourceOwnerForget().
Date: Mon, 22 Jun 2026 16:59:24 +0000
Message-ID: <E1wbhzX-001QS6-2n@gemulon.postgresql.org> (raw)
pgcrypto: avoid recursive ResourceOwnerForget().
Raising an error within a function using an OSSLCipher object led
to a complaint from ResourceOwnerForget and then a double-free crash,
because ResOwnerReleaseOSSLCipher forgot to unhook the OSSLCipher
object from its owner. (The sibling logic for OSSLDigest objects got
this right, as did every other ReleaseResource function AFAICS.)
Oversight in cd694f60d.
Bug: #19527
Reported-by: Yuelin Wang <3020001251@tju.edu.cn>
Author: Yuelin Wang <3020001251@tju.edu.cn>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19527-6e7686960c6dce78@postgresql.org
Backpatch-through: 17
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/020426268ff6acaa140780336eb1c50b034cb893
Modified Files
--------------
contrib/pgcrypto/openssl.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
view thread (3+ messages) latest in thread
Message-ID: <E1wbhzX-001QS6-2n@gemulon.postgresql.org>
Permalink: ../E1wbhzX-001QS6-2n@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wbhzX-001QS6-2n@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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pgcrypto: avoid recursive ResourceOwnerForget().
In-Reply-To: <E1wbhzX-001QS6-2n@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox