Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEfuK-0000YI-NS for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jul 2022 23:48:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oEfuJ-0008CX-8m for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jul 2022 23:48:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEfuI-0008CO-UR for pgsql-hackers@lists.postgresql.org; Thu, 21 Jul 2022 23:48:38 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oEfuG-0005og-KB for pgsql-hackers@postgresql.org; Thu, 21 Jul 2022 23:48:37 +0000 Received: by mail-pj1-x1031.google.com with SMTP id l14-20020a17090a72ce00b001f20ed3c55dso2768759pjk.5 for ; Thu, 21 Jul 2022 16:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=zi1QiN3XAWZas1cIS5rubzFVGn3mxBYwmoVGswLyR7c=; b=l2CQAHgB0OpggBcC2gbEzOA8ydIPYXcA/97/B5LW/kqtsRQYbDtG7NT7Tue/qwdVBn YO9zw9Xo6NvFAVfgDIiushpG2R4mxXJxKJWby/8Uk+ydhr4rOC3uIr+pTsTySl9jsRuV qso3BuyBgjsFS9eKC/0sSxOAoKlyUPi56f5l9DjicjUgKe9KhSSpokYud4fasg8fL1PS 34trhJBaD4a04EQ8iPq/XVgM/f4blhzii53DGqagkeG6smcEOyTSviK0kgg0CtiQcMgO Lg8IcEjorOpylVM6qvi/EFHCayJgtm7YOd8Did/fnr2eazHJxQUhpoYhVqqL4siqiuL+ G2WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=zi1QiN3XAWZas1cIS5rubzFVGn3mxBYwmoVGswLyR7c=; b=RK1ohaz5VnPnviYgY78z9fMHMWZsMs6f+Hb9jz//QFYZFCsc8dr8OuzcRtAaCGQZ4H ln9FfVzNxX4OHvtAPxvLxCOPK9AUdHrqg8yxlywdT1YLECC0K7Ivw3pTJ1UX6wcEK6jO xOxMCUVnuxCV0C8gJ3vJzIMI395qaXA9fYryboQMF92SXW2gSYQoepeiEd6sFuH+PKDQ IDnA41Zeo4Ojs4X16OL5KkTfPlvaIijE9vSQjzu7uiSpm+wMZMIeTfZOBDbcTrPLdIC8 YQ1Lg4nF1uXMtcridi3EdECkjAv7jeTcvkTpS116Z+qWRULYM72U4xB9c73G3z8kZNXR jgMg== X-Gm-Message-State: AJIora+qXjEYYSMtMRiBJZmNAu0chNNdWcqw0HskVKd3F+Cv7sPrOeUn zYJayl81xD66SxSzNbFFMG0= X-Google-Smtp-Source: AGRyM1szhmvilYFf4ktQoPLly1cG7oH5YAlJPllktwDPU/GxknLKalLphCaW9246mO6tvl0F30fgSw== X-Received: by 2002:a17:902:e84e:b0:16c:773:9daf with SMTP id t14-20020a170902e84e00b0016c07739dafmr715031plg.43.1658447315272; Thu, 21 Jul 2022 16:48:35 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id j10-20020a63230a000000b0040dffa7e3d7sm2021653pgj.16.2022.07.21.16.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 16:48:34 -0700 (PDT) Date: Thu, 21 Jul 2022 16:48:32 -0700 From: Nathan Bossart To: Tom Lane Cc: Gurjeet Singh , Postgres Hackers Subject: Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS Message-ID: <20220721234832.GA3815415@nathanxps13> References: <20220705174938.GB2566600@rfd.leadboat.com> <335170.1658439851@sss.pgh.pa.us> <20220721222900.GA3813377@nathanxps13> <348146.1658446220@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <348146.1658446220@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jul 21, 2022 at 07:30:20PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> + StartTransactionCommand(); >> process_session_preload_libraries(); >> + CommitTransactionCommand(); > > Yeah, that way would avoid any questions about changing the order of > operations, but it seems like a mighty expensive solution: it's > adding a transaction to each backend start on the off chance that > (a) session_preload_libraries/local_preload_libraries is nonempty and > (b) the loaded libraries are going to do anything where it'd matter. > So that's why I thought of moving the call inside a pre-existing > transaction. > > If we had to back-patch this into any released versions, I'd agree with > taking the performance hit in order to reduce the chance of side-effects. > But I think as long as we only have to do it in v15, it's not too late to > possibly cause some compatibility issues for extensions. Yeah, fair point. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com