Re: BUG #19601: Vuln45: Unbounded recursion via self-retying Perl scalar in bool_plperl's SvTRUE call causes backend

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com>
Cc: 1217816127(at)qq(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19601: Vuln45: Unbounded recursion via self-retying Perl scalar in bool_plperl's SvTRUE call causes backend
Date: 2026-08-03 22:01:50
Message-ID: 752052.1785794510@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Zexin Li 2026-08-04 01:04:44 Re: BUG #19583: macaddr input accepts octet fields longer than 8 hex digits
Previous Message Andrey Rachitskiy 2026-08-03 21:10:50 Re: BUG #19601: Vuln45: Unbounded recursion via self-retying Perl scalar in bool_plperl's SvTRUE call causes backend