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 1qEyH1-0008WM-OE for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jun 2023 20:29:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qEyGz-00008q-Bp for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jun 2023 20:29:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qEyGz-000057-23 for pgsql-hackers@lists.postgresql.org; Thu, 29 Jun 2023 20:29:49 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qEyGv-001EQN-Hq for pgsql-hackers@postgresql.org; Thu, 29 Jun 2023 20:29:47 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1b80b514fb7so6871525ad.0 for ; Thu, 29 Jun 2023 13:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688070584; x=1690662584; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=bwPbZIy4RMk7SiBCSq+AgS1safRFjyNh82AZdCIJi00=; b=EQElHAMKUlU1WHs0RzLh9R8jUMgrnEBv02XSKpG6W1mz1P6WzFx/9qXlLd8jCR4qch sGQcWigdAssogUrELzDXeUKuZTifXbhnIY+S5DPGiXdi2bIdn/aVa3JNs0Ab/wQqs5Rb KDjB7tkzrEBQ8BJrfqsznzDqGT+/eiHft2GvbEhAfd1re/HD1e81UF71e7mjleJ3L5sG c+6TFdfuWpl/2Y8AwLU/NFNF7vEcleZdn7zDVGKpW14oJd6/3Uj59ReRL7gCyGuhvjc6 u0wBml4imkAQQxiJ/FVzS09zk9RghwnJ8uQM2oEhRmbSu6gXtYqc3cVe/X563cCeEeJv +AcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688070584; x=1690662584; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bwPbZIy4RMk7SiBCSq+AgS1safRFjyNh82AZdCIJi00=; b=A1dIjLdWPFE+KWLayZOcnA9WT+pFRqwbjKZvgzFslWjxBErnQHg8dKqJSE8hud/Vc5 r7Stq1iYiWhgfEFC2EJKHxb1SRl0XYwp3fB20KXS8AR/k6EDsSv6V9f3/ukYM1BpbvoF XwvPagjE97heGQFnNZ9MDdTCyv9nqjy2kIMKCG1tcfX/AwpJ2oYhnDRZA0LouYTVZwKf zzXrWkxLO7vtprlZhWCGR7PuX4Ji57NOfMjnnyS5c9hJi2mLbGhqhd2JGUsft0P+hhr/ UOTietekIMmh/3jfcAlx0SpAov0MdWB3Rk8ABtBCbC1OgSbiSUBSCEIGxQtjab0UmXSd 7fMg== X-Gm-Message-State: ABy/qLbeUuCJtn6En73goE2uoIoQQ/6SRYR7gaLaEnrl7A8z/GXYBmaf N6skZ5bVCYn5Do7vMfcYWmc= X-Google-Smtp-Source: APBJJlGY961GQ2HWL2TbuBQ80Vdv3OJPBn26sMZp3dWzfdSqnG7BA1QN0f9SbFSuqElqBBVierO6Uw== X-Received: by 2002:a17:902:f690:b0:1b8:6222:63e3 with SMTP id l16-20020a170902f69000b001b8622263e3mr277524plg.57.1688070583696; Thu, 29 Jun 2023 13:29:43 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id g1-20020a170902c38100b001ae0152d280sm9441035plg.193.2023.06.29.13.29.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 13:29:43 -0700 (PDT) Date: Thu, 29 Jun 2023 13:29:40 -0700 From: Nathan Bossart To: Robert Haas Cc: Jeff Davis , Tom Lane , Noah Misch , "pgsql-hackers@postgresql.org" Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations. Message-ID: <20230629202940.GA2052174@nathanxps13> References: <573014.1686375211@sss.pgh.pa.us> <20230612170510.GA201972@gust.leadboat.com> <20230613182920.GA259321@gust.leadboat.com> <1799839.1686687804@sss.pgh.pa.us> <4df537f5a0d8c0ceac3eec3809d1144880b8e76d.camel@j-davis.com> <578fb4be80247570e6a05924908765a0b345971e.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jun 29, 2023 at 11:19:38AM -0400, Robert Haas wrote: > [ emerges from hibernation ] Welcome back. > If we're not going to fix the feature so that it doesn't break the > security model, we should probably just revert it. I don't understand > at all the idea of shipping something that we 100% know is broken. Given Jeff's commit followed the precedent set by the fix for CVE-2018-1058, I'm inclined to think he was on the right track. Perhaps a more targeted fix, such as only changing search_path when the command is not run by the table owner (as suggested upthread [0]) is worth considering. [0] https://postgr.es/m/CAKFQuwaVJkM9u%2BqpOaom2UkPE1sz0BASF-E5amxWPxncUhm4Hw%40mail.gmail.com -- Nathan Bossart Amazon Web Services: https://aws.amazon.com