Re: use-after-free in jsonb_set_lax()

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Manu <manuelreyesbravo(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: use-after-free in jsonb_set_lax()
Date: 2026-10-15 05:31:07
Message-ID: CANWCAZYbYkOUPWb2snASVrpxQZc=FanrMHTJFJgMM7aS3LUdkg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Oct 15, 2026 at 11:08 AM Manu <manuelreyesbravo(at)gmail(dot)com> wrote:
> > I didn't find any other places in the code base with a similar bug,
> > but of course I can't be certain.
>
> I swept for siblings and found none. Of the 444 writes to
> fcinfo->args[] in the backend, all go into a frame the function built
> itself or an executor/planner frame, except 15 into a caller-supplied
> frame; jsonb_set_lax is the only SQL-callable one among those. Const
> args are written once at expression init in the expected places
> (ExecInitFunc, the JSON constructors). Same on 14-17. A differential
> multi-row vs per-row fuzz over the jsonb family (132k cases, cassert
> and ASan) only ever fires in jsonb_set_lax, and is clean with v1.

Please don't copy and paste LLM output into emails. It's annoying.

--
John Naylor
Amazon Web Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Staroverov Ilja 2026-10-15 06:08:19 Re: VACUUM/ANALYZE double-count the backend's own pending table stats
Previous Message Gaurav Singh 2026-10-15 05:06:06 Re: pg_stat_statements stores WITH HOLD cursor query with literals