Re: syntax error causes crafted data to be executed in shell - Mailing list pgsql-bugs

From Tom Lane
Subject Re: syntax error causes crafted data to be executed in shell
Date
Msg-id 22001.1103311930@sss.pgh.pa.us
Whole thread Raw
In response to syntax error causes crafted data to be executed in shell  ("Thomer M. Gil" <postgresql@thomer.com>)
Responses Re: syntax error causes crafted data to be executed in shell  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
"Thomer M. Gil" <postgresql@thomer.com> writes:
> More details and the, in my opinion, somewhat reckless response by one
> of the Debian postgresql package maintainers are available at:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=285844

The response you're going to get here is not a lot different from what
you got there, mainly because it's mostly the same people here ;-).

I tend to agree with Peter that you haven't presented a reason to panic.
I'm not aware of any supported situation where psql would fail to parse
a COPY command output by pg_dump.  It could happen when trying to load
newer dump data into an older server, but that's unsupported, and we
have no way to retroactively fix the behavior of older versions anyway.
So there's no point in treating this as a security issue.

Still, it looks like it would be relatively easy to suppress evaluation
of backticked arguments once we recognize that the backslash command has
failed, and I would say that that's a reasonable change to make on the
principle of least surprise.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Thomer M. Gil"
Date:
Subject: syntax error causes crafted data to be executed in shell
Next
From: Ken Johanson
Date:
Subject: Re: BUG #1350: Backslash ecape charcter violates ISO/ANSI