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 1r1ttL-00ECUQ-0s for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Nov 2023 19:43:40 +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 1r1ttI-008DaH-Rj for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Nov 2023 19:43:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r1ttG-008Da9-Pz for pgsql-hackers@lists.postgresql.org; Sat, 11 Nov 2023 19:43:36 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r1ttD-0056On-1c for pgsql-hackers@lists.postgresql.org; Sat, 11 Nov 2023 19:43:33 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 8B8663200925; Sat, 11 Nov 2023 14:43:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 11 Nov 2023 14:43:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1699731807; x=1699818207; bh=jsc35giAXaFIx2WwkPLT0uDKh4CyS78r8bf USbm/i6A=; b=F6XjTViygekd8VWreD3o1dTMD6YqAypN6UIudLuNUM/39k3Kgci bz3rL87HtgVHaEQFQZid2Gg1H86+wMht1appLRqbmIEPeHkAj8GYLga2cGCHPFb9 9HWY9xez3dH2sXEc6tNFKnYgXlmSvz+s290SFxP6hiIFc+HWN6+rx0plZQgJgc63 rtjjReUYt2amZe1nf22h2ntdSTNWwR9r1OyAqv8+utCtX+4FQO3gWMN2TnTW0CLh q7CZUpVpnJc+5Bvdxym02YoOpIywPQkIqISgq4fD1442E4FBofviN96MvECAkzCe BXi27B3R+eS3GA6Bg6NzJcp/nRU0QB0oqmQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1699731807; x=1699818207; bh=jsc35giAXaFIx2WwkPLT0uDKh4CyS78r8bf USbm/i6A=; b=mVTzp+FnPFTtJC0iPaLnYIqiTH14ndVdqdakEHCIbnFJPL6xLsR 31jjcI1QFQH8CcbfHcJlJ+OUn46mjXY/Bgh4vZwxxTy0hGa3ga3CSQIwJxWHOu87 gnA/2+tBpqW3cSENg/KJE/6jcmJXR9MWVKrYhWlgjF0OgZNsiQRvr7Zoe6PH4D1G 1hbA9VoCWibSDkrSCZhyFyzk0acLjQD3+r/otZrUtUtSp2GwD2GE2mW9Yt4ok4qY +mm2vQOp6M34Vd8DxVCpPYDmCVATfokjInpIa/MhpPevReKnAjXFsF2i5VutKViE T6K7xcGhe8DLSXTH3YsiiFs7ERdFEp0ePxw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvhedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtjeenucfhrhhomheptehn ughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecugg ftrfgrthhtvghrnhepudeufeejhefffeetieelgfffhefhvdegvdevhfdvtdevieffudeg hfekledvtddunecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghn rghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 11 Nov 2023 14:43:26 -0500 (EST) Date: Sat, 11 Nov 2023 11:43:25 -0800 From: Andres Freund To: Thomas Munro Cc: Christoph Berg , pgsql-hackers@lists.postgresql.org, Michael Paquier Subject: Re: pgsql: Don't trust unvalidated xl_tot_len. Message-ID: <20231111194325.d44tjbsofirhqutb@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-11-12 07:17:02 +1300, Thomas Munro wrote: > On Sun, Nov 12, 2023 at 12:53 AM Christoph Berg wrote: > > Re: Thomas Munro > > > In the 13 branch we see that's in the new scan_server_header() > > > subroutine where it tries to open the header, after asking pg_config > > > --includedir-server where it lives. Hmm... > > > > It's no ok to use pg_config at test time since `make install` might > > not have been called yet: > > > > https://www.postgresql.org/message-id/2023925.1644591595@sss.pgh.pa.us > > https://www.postgresql.org/message-id/YqkV/hoi2SX91it8@paquier.xyz > > [CC'ing Michael who was involved in that analysis and who also wrote > those bits of this commit] > > We don't have an installation into the final --prefix, but we have > tmp_install, surely? Yea, that should work and does work locally. I guess it'd fail though, if you somehow ran the tests with NO_TEMP_INSTALL=1 or such. > And the tests are run with PATH set to point to > tmp_install's bin directory. It looks like it did actually find a > pg_config executable because otherwise we'd have hit die "could not > execute pg_config" and failed sooner. So now I'm wondering if the > pg_config it found gives the wrong answer for --includedir-server, > because of Debian's local patches that insert a major version into > some paths.