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 1r1yFQ-00EVr2-Un for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Nov 2023 00:22:45 +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 1r1yFO-008p0v-7V for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Nov 2023 00:22:42 +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 1r1yFN-008p0m-Bu for pgsql-hackers@lists.postgresql.org; Sun, 12 Nov 2023 00:22:41 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r1yFJ-005yKf-Te for pgsql-hackers@lists.postgresql.org; Sun, 12 Nov 2023 00:22:40 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 857655C00A1; Sat, 11 Nov 2023 19:22:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 11 Nov 2023 19:22:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc: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=1699748555; x=1699834955; bh=Kw ulfbM2H54mxWRPf7zqXHN3C+RAFEU8FaYF0bxDIbE=; b=leX3kf+d2VR7BdxnhM ElZ0z5t+Tfo9RLsZgH6Y4YloQ26d/GZjbRVz/kLfmbpqXotziQoYTteZ1Btqz8kC sUE5utUl5vEAcj6N3F0u7GFJSBZnG6HoOhfvvOn2ZCXE3CQZtGu/JMRO9sdgUpHp XqmWbh9TwSgVKS4nI12T7PgMMqTmGtbWobZdqQAlifruk/3E051gU1mO8Y+p6QT5 Z0Go9jUbmK5BPhVbCWnpDXUpwDYxMqOdZx8yBEw8JP97tr9kV5lTxQmmEnhIqe7Z pV9CjpQZ1/YRknDEOS30LLMf4E6ulBvt9duH1vonm2mbVBIuLGe0xnzL6VmNu8Gf Q9bA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=1699748555; x=1699834955; bh=KwulfbM2H54mx WRPf7zqXHN3C+RAFEU8FaYF0bxDIbE=; b=WMrcTymolVuhswHREa4ZwrjESONi9 G3pDfqBqLDAi7ImfniKah68Ax0Bvfjc0gthEf7IaalPoaYRvdd+CFIap0A6k8vUf vvsfGiyQl7VzLTyzGWcRZNMm3OytkatWRpNsXw0qzsihsM0+LztIBS9wuDdW8zjR XOeiWNy6t0nj/xWSC2iXK66o+EXvIRBdfMuVfYs83RCpPuY66LTPN9P6ouxTbquH dHRcyRnhg8nVcImkfytzIImXSIVJJ9nWNZUs0WT3AuqPMnpSgUNZ0by2u+LU4Jdi /6bvsLvKOGCVxSxMQpN2G/Jsm61F+f3zZyYp7k/j+EipJbI0vOBGThzVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddviedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 11 Nov 2023 19:22:33 -0500 (EST) Date: Sun, 12 Nov 2023 09:22:20 +0900 From: Michael Paquier To: Thomas Munro Cc: Christoph Berg , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Don't trust unvalidated xl_tot_len. Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YeCk5ZfbTlNnPdsR" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --YeCk5ZfbTlNnPdsR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Nov 12, 2023 at 12:17:54PM +1300, Thomas Munro wrote: > No opinion on potential advantages to other approaches, but I don't > see why this way shouldn't be expected to work. So I hope you can > drop that diff. Another thing that could be done in stable branches is just to switch 039_end_of_wal.pl to hardcoded values for $XLP_PAGE_MAGIC and $XLP_FIRST_IS_CONTRECORD. This is not going to change in a released version anyway, so there's no real maintenance cost. -- Michael --YeCk5ZfbTlNnPdsR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmVQGrwACgkQnvQgOdby QH2vWhAAlr4ZQZYZkW3TpeTK3mx6p7xsY7lzbH9LmE+cKCB8yIpvkBDSZayjgnPW 02mAczwtKqxsyLGSS+ieXJQoWLpE1JyJfAMX6ymJJRAwLv+oKYpeqMgOACuIbdlk L8iX2U0XwNiczJsSD22Z7kcVYczgWDC78lj8Ttolnfnqv+u27M6/ESufi/80vmyi MyRs44LHZfNz8Edq7SAPyBsYHnx+cjC9z3aLPjAxVWeHLuouvYcL7fP29VkZgBX7 57s+g6pQ+hmW/B9UiwYLG//xkZNWzWq0OIqgspHrkFSCR7FKUDKu3Bf+/HD454q2 Jp3cG88sfzHWvIDJg0uTlX4qg7pRb+2sjd1WH0bOJZwgVtv/TvChYcVGqZi0d8oB PIrdMD+sjT2isWH/fChXk1H3+Q6CWw8+/a5bRmLR41bWcFipV3oIwdZYB6GqCFPb yzA49VG99S73f9lf4q8f2g1uF8kqAPb5DW79Nv0fVbXtEZDx4tyOVwN1RowwkbzS o1PqR0suXbKmmEnlLXostm5U2Mvh4VOpAZh+EcJy2wsuG5tGMeoyijZOg7ipLV4N HJtQVWpUlPwaZpHnA1ZeXT799EbVmpWCM3gZSGsDqAugKmlc17gbbv/CCGFcB0oW NNmJik1UrZv3tfT8uQuo8aLF9T4k5NIf6k0a37K414M6bmJvheM= =NDP0 -----END PGP SIGNATURE----- --YeCk5ZfbTlNnPdsR--