Re: glibc qsort() vulnerability

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: glibc qsort() vulnerability
Дата
Msg-id 20240207205600.GA378707@nathanxps13
обсуждение исходный текст
Ответ на Re: glibc qsort() vulnerability  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: glibc qsort() vulnerability  (Mats Kindahl <mats@timescale.com>)
Список pgsql-hackers
On Wed, Feb 07, 2024 at 08:46:56PM +0200, Heikki Linnakangas wrote:
> Doesn't hurt to fix the comparison functions, and +1 on using the same
> pattern everywhere.

I attached a new version of the patch with some small adjustments.  I
haven't looked through all in-tree qsort() comparators to see if any others
need to be adjusted, but we should definitely do so as part of this thread.
Mats, are you able to do this?

> However, we use our qsort() with user-defined comparison functions, and we
> cannot make any guarantees about what they might do. So we must ensure that
> our qsort() doesn't overflow, no matter what the comparison function does.
> 
> Looking at our ST_SORT(), it seems safe to me.

Cool.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: "Euler Taveira"
Дата:
Сообщение: Re: speed up a logical replica setup
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Statistics Import and Export