Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubNx6-000D1q-3D for pgsql-general@arkaria.postgresql.org; Mon, 14 Jul 2025 18:31:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ubNx3-00B6LG-G4 for pgsql-general@arkaria.postgresql.org; Mon, 14 Jul 2025 18:30:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubNx3-00B6L7-5B for pgsql-general@lists.postgresql.org; Mon, 14 Jul 2025 18:30:57 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ubNx1-007gNl-1L for pgsql-general@lists.postgresql.org; Mon, 14 Jul 2025 18:30:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 56EIUjmD708242; Mon, 14 Jul 2025 14:30:45 -0400 From: Tom Lane To: "Peter J. Holzer" cc: pgsql-general@lists.postgresql.org Subject: Re: Bypassing Directory Ownership Check in PostgreSQL 16.6 with Secure z/OS NFS (AT-TLS) In-reply-to: <20250714182016.23ypyxgtq6vbgl4c@hjp.at> References: <13e3100fc7c7d14919c37943dcfd76b263cecce2.camel@cybertec.at> <609925.1752502040@sss.pgh.pa.us> <20250714182016.23ypyxgtq6vbgl4c@hjp.at> Comments: In-reply-to "Peter J. Holzer" message dated "Mon, 14 Jul 2025 20:20:16 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <708240.1752517845.1@sss.pgh.pa.us> Date: Mon, 14 Jul 2025 14:30:45 -0400 Message-ID: <708241.1752517845@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Peter J. Holzer" writes: > On 2025-07-14 10:07:20 -0400, Tom Lane wrote: >> That is primarily for safety reasons: if for some reason the >> filesystem gets dismounted, or hasn't come on-line yet during >> a reboot, you do not want Postgres to be able to write on the >> underlying mount-point directory. > Be careful: There are two different directorys involved in a mount > point. The one in the parent filesystem and the one in the mounted file > system. True, and the safety requirement really is only that the parent filesystem's mount-point directory not be writable by us. But normal practice is that both directories are root-owned, or at least owned by highly privileged users. (I have a vague idea that there are system-level security hazards, not specific to Postgres, if mount-point directories are publicly writable. Don't feel like researching that though.) regards, tom lane