Re: Leakproofness of texteq()/textne()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Leakproofness of texteq()/textne()
Дата
Msg-id 31274.1568323169@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Leakproofness of texteq()/textne()  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Leakproofness of texteq()/textne()  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I wouldn't feel comfortable with ignoring information leaks that can
> happen with some valid strings but not others. That sounds like
> exactly the sort of information leak that we must prevent. The user
> can write arbitrary stuff in their query, potentially transforming
> strings so that the result hits the ERROR iff the original string had
> some arbitrary property P for which they wish to test.

Agreed.

> However, I wonder if there's any realistic case outside of an encoding
> conversion where such failures can occur. I would expect, perhaps
> naively, that the set of characters that can be represented by UTF-16
> is the same set as can be represented by UTF-8.

Unless Microsoft did something weird, that doesn't seem very likely.
I'm more worried about the possibility that ICU contains weird exception
cases that will make it fail to compare specific strings.  Noting
that ucnv_toUChars has an error indicator but ucol_strcoll does not,
it seems like again any such cases are going to boil down to
encoding conversion problems.

However, if there is some character C that makes ICU misbehave like
that, we are going to have problems with indexing strings containing C,
whether we think varstr_cmp is leaky or not.  So I'm not sure that
focusing our attention on leakiness is a helpful way to proceed.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Leakproofness of texteq()/textne()
Следующее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: [bug fix??] Fishy code in tts_cirtual_copyslot()