agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: pgcrypto: avoid recursive ResourceOwnerForget().
3+ messages / 1 participants
[nested] [flat]

* pgsql: pgcrypto: avoid recursive ResourceOwnerForget().
@ 2026-06-22 16:59  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2026-06-22 16:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/80bb0ebcc11fb9cb5904d490640408b3d7003a17

Modified Files
--------------
contrib/pgcrypto/openssl.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: pgcrypto: avoid recursive ResourceOwnerForget().
@ 2026-06-22 16:59  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2026-06-22 16:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: pgcrypto: avoid recursive ResourceOwnerForget().
@ 2026-06-22 16:59  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2026-06-22 16:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2aa6be6e64812ab3421b506c20b0e15078160e75

Modified Files
--------------
contrib/pgcrypto/openssl.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-06-22 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-06-22 16:59 pgsql: pgcrypto: avoid recursive ResourceOwnerForget(). Tom Lane <tgl@sss.pgh.pa.us>
2026-06-22 16:59 pgsql: pgcrypto: avoid recursive ResourceOwnerForget(). Tom Lane <tgl@sss.pgh.pa.us>
2026-06-22 16:59 pgsql: pgcrypto: avoid recursive ResourceOwnerForget(). Tom Lane <tgl@sss.pgh.pa.us>

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