agora inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrey Rachitskiy <pl0h0yp1@gmail.com>
Cc: 1217816127@qq.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19601: Vuln45: Unbounded recursion via self-retying Perl scalar in bool_plperl's SvTRUE call causes backend
Date: Mon, 03 Aug 2026 18:01:50 -0400
Message-ID: <752052.1785794510@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB8bMiuZMHtW+2E-brFjy5wPttdkf5JF=FoQuDj5xR_9tBcdog@mail.gmail.com>
References: <19601-92d59d2242c00966@postgresql.org>
	<CAB8bMiuZMHtW+2E-brFjy5wPttdkf5JF=FoQuDj5xR_9tBcdog@mail.gmail.com>

Andrey Rachitskiy <pl0h0yp1@gmail.com> writes:
> Thanks for the report.  I can reproduce the SIGSEGV on current master
> (with --with-perl).

I can't get excited about this.  A plperl user who wishes to cause
recursion to stack overflow can do so far more simply than what is
proposed here: just write an indefinitely-recursive Perl function
and call it.  That recursion will be totally inside libperl, so
we can do nothing about it.  The same holds for every other PL
that exposes a general-purpose programming language.

I certainly wouldn't add the amount of code you propose here to close
off just one route to that, even if I trusted the patch which I don't.
(It seems far too much in-bed with details of libperl's innards, and
hence likely to fail on other Perl versions than what you tested.)

			regards, tom lane






view thread (4+ messages)  latest in thread

Message-ID: <752052.1785794510@sss.pgh.pa.us>
Permalink:  ../752052.1785794510@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/752052.1785794510@sss.pgh.pa.us

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pl0h0yp1@gmail.com, 1217816127@qq.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19601: Vuln45: Unbounded recursion via self-retying Perl scalar in bool_plperl's SvTRUE call causes backend
  In-Reply-To: <752052.1785794510@sss.pgh.pa.us>

* 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