Re: char 0x00

Поиск
Список
Период
Сортировка
От Brett Okken
Тема Re: char 0x00
Дата
Msg-id CANBJVOEO5GVXVrucPK9iUpr9CgODsZ_cwFsBoDOs8O50=eqRBQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: char 0x00  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: char 0x00
Список pgsql-docs
Dave, any thoughts on best way to reproduce Vladimir’s described workflow in a way that is consumable by the postgresql team?

On Thu, Mar 26, 2020 at 10:21 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Brett Okken <brett.okken.os@gmail.com> writes:
> Using a client and server encoding of SQL_ASCII makes it possible to get
> 0x00 into a text value column when using a bind variable.

Having looked at the code again, I flat out don't believe you.
textin is certainly not going to read past a nul character,
and textrecv goes through pg_client_to_server (via pq_getmsgtext),
which AFAICS is careful in all code paths to reject nuls.

If I'm missing something, I'd really like to see a concrete example,
because this would be a bug, and it'd suggest that somebody's managed
to reopen CVE-2006-2313.  If we're missing nul rejection in some code
path, then we're probably not doing encoding validation at all.

                        regards, tom lane

В списке pgsql-docs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: char 0x00
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: char 0x00