Re: PG16.1 security breach?

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: PG16.1 security breach?
Дата
Msg-id
1691575.1718233014@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
PG16.1 security breach? "Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch>
Re: PG16.1 security breach? Joe Conway <mail@joeconway.com>
AW: [Extern] Re: PG16.1 security breach? "Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch>
Re: AW: [Extern] Re: PG16.1 security breach? Laurenz Albe <laurenz.albe@cybertec.at>
PG16.1 security breach? "David G. Johnston" <david.g.johnston@gmail.com>
Re: PG16.1 security breach? Laurenz Albe <laurenz.albe@cybertec.at>
Re: PG16.1 security breach? "David G. Johnston" <david.g.johnston@gmail.com>
Re: PG16.1 security breach? Ron Johnson <ronljohnsonjr@gmail.com>
Re: PG16.1 security breach? Tom Lane <tgl@sss.pgh.pa.us>
Re: PG16.1 security breach? Joe Conway <mail@joeconway.com>
Re: PG16.1 security breach? "David G. Johnston" <david.g.johnston@gmail.com>
Re: PG16.1 security breach? "David G. Johnston" <david.g.johnston@gmail.com>
Re: AW: [Extern] Re: PG16.1 security breach? Adrian Klaver <adrian.klaver@aklaver.com>
Re: PG16.1 security breach? "David G. Johnston" <david.g.johnston@gmail.com>
Ron Johnson  writes:
> On Wed, Jun 12, 2024 at 4:36 PM David G. Johnston <
> david.g.johnston@gmail.com> wrote:
>> I think my point is that a paragraph like the following may be a useful
>> addition:
>> 
>> If one wishes to remove the default privilege granted to public to execute
>> all newly created procedures it is necessary to revoke that privilege for
>> every superuser in the system

> That seems... excessive.

More to the point, it's wrong.  Superusers have every privilege there
is "ex officio"; we don't even bother to look at the catalog entries
when considering a privilege check for a superuser.  Revoking their
privileges will accomplish nothing, and it does nothing about the
actual source of the problem (the default grant to PUBLIC) either.

What I'd do if I didn't like this policy is some variant of

ALTER DEFAULT PRIVILEGES IN SCHEMA public
  REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC;

Repeat for each schema that you think might be publicly readable
(which is only public by default).

BTW, in PG 15 and up, the public schema is not writable by
default, which attacks basically the same problem from a different
direction.

			regards, tom lane


В списке pgsql-general по дате отправления
От: Rich Shepard
Дата:
От: Adrian Klaver
Дата:
FAQ