Re: [sqlsmith] Crash on GUC serialization

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Seltenreich <seltenreich(at)gmx(dot)de>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [sqlsmith] Crash on GUC serialization
Date: 2016-11-19 17:44:23
Message-ID: CAB7nPqRdpG_WuVTwpp6=b0wEDPki7hPX+iLwKf9e4Q-iEj0APQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 19, 2016 at 9:31 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andreas Seltenreich <seltenreich(at)gmx(dot)de> writes:
>> sqlsmith just made a GUC that tricks the serialization code into
>> dereferencing a nullpointer. Here's a recipe:
>
> Thanks for the report! Looks like the serialization code has overlooked
> the fact that string-valued GUCs can be NULL. Surprising we didn't
> find that before ...

I was half-way through it when you sent your email. It seems to me
that we need to take care only of the case for PGC_STRING, per the
attached.
--
Michael

Attachment Content-Type Size
fix-guc-string-eval.patch text/plain 499 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Seltenreich 2016-11-19 17:51:52 Re: [sqlsmith] Crash on GUC serialization
Previous Message Stephen Frost 2016-11-19 17:33:16 Re: pg_dump -s -b