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 1rSrUj-00GPFC-Ij for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Jan 2024 04:37:42 +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 1rSrUi-00C1dx-63 for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Jan 2024 04:37:40 +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 1rSrUg-00C1Y5-CN for pgsql-bugs@lists.postgresql.org; Thu, 25 Jan 2024 04:37:39 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rSrUc-003F2A-MP for pgsql-bugs@lists.postgresql.org; Thu, 25 Jan 2024 04:37:37 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id EF4A05C0096; Wed, 24 Jan 2024 23:37:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 24 Jan 2024 23:37:30 -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:subject :subject:to:to; s=fm3; t=1706157450; x=1706243850; bh=S/dSgFl5i6 +oPwVOrv+L8aMFNGsf6oHFQTeo/rPF4O0=; b=g4PiyJrb97uq2hWpw3Hsb2kJZf BSjYtEVHAm0J/6mLLDADB/DhzSIoo6bIktWT/YV0krDDJL/VB3m5pECCSm6RfP8/ PrEgOmpMus8Ypae4QwaBZXh+I/O4BxYC8odlOQNY3a1jKIYdbIiepHelNov1VFxk GtMxM1tlUh2Q4kUn30qszkEjU49U9oQrOndDoptEkERqwnDrRXLzYTHoRusUSQpK 91uffU9EwFwsRo9o7BMwIJIv94xRKnWT2J1u4CfXodQPVAauB2RSu12Zw47q299/ CdQZkn4US7NIpsKENe77BsN7o5TdpYSfGcwmSgEKkezv13UW2UESfjeGSPIA== 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:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706157450; x=1706243850; bh=S/dSgFl5i6+oPwVOrv+L8aMFNGsf 6oHFQTeo/rPF4O0=; b=Byq0Gq/+6N2QDmxKLQN/AGUmQYusjN8CpkBwmHgjPaXm cYMV6nJC7u5yMvzd6jRMe/DX+9rfDv+R4mcDtyixEgZco8zKefRWpGoNjeyGEH9A nPnQYZPbqjnSruIqeYqn/ZgA9JoMK3DsVeJykhSkzLTWr7CTFi+qtkW2tDLT1vP2 0354K/oTUnr4QE1SAdxU3m2fiaE2xcec/UKgdY2/XCddcheh2WiG6d1W2sJ57di2 eHgP/qn7C5+bfN4tzOKHYlMrgBeO7H7AS6Lb2hsAGzh6ifLGGSsXFUiuerboAJNA O3I70BfqRsTfTT1xaGL33xQtRi1qunMpeO/l7rdZ0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdelvddgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepffdtjedtgfduheegteekhffg uddtiefhheevvdegudeuhefhfeeigeekgedtleeinecuffhomhgrihhnpeifihhkihhpvg guihgrrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Jan 2024 23:37:28 -0500 (EST) Date: Thu, 25 Jan 2024 13:37:22 +0900 From: Michael Paquier To: Dmitry Koval Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18274: Error 'invalid XML content' Message-ID: References: <18274-98d16bc03520665f@postgresql.org> <1616257.1704651529@sss.pgh.pa.us> <5588db01-45be-48ff-b158-85f789bc502c@postgrespro.ru> <1314313.1705259848@sss.pgh.pa.us> <0eea123f-388a-41ea-9df3-d4606cf9ed8d@postgrespro.ru> <35ef78f9-8958-4225-ae7e-aead71b0feed@postgrespro.ru> <24e7412a-890c-46e3-b17d-addc39ff813f@postgrespro.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eba4yV05fvKkAauo" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --eba4yV05fvKkAauo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 17, 2024 at 08:59:26AM +0900, Michael Paquier wrote: > This one had better be done first because it is required by your > original issue, and that's what could make the buildfarm shaky. >=20 > I have checked the other XML calls in the tree and did not spot > anything else that ought to be changed, so I have extracted this stuff > from your v2 and applied it on HEAD. Let's see how it goes. The security team has discussed 2197d06224a1 after a report from coverity regarding the effects that issues like [1] would create in the backend, and concluded that this patch should be reverted because this could cause the backend to waste plently of CPU and/or memory even if the application applied checks on the size of the data given in input, and libxml2 does not offer guarantees that input limits are=20 respected under XML_PARSE_HUGE. So I am planning to do do so in the next 24 hours. Note that this does not impact 65c5864d7fac, as XML_PARSE_NOENT is an immediate substitute of xmlSubstituteEntitiesDefault(). [1]: https://en.wikipedia.org/wiki/Billion_laughs_attack -- Michael --eba4yV05fvKkAauo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmWx5YIACgkQnvQgOdby QH2fhhAAkEcE8Ktvqci80JrR+zrDcLGjyRafsUbOTtlXINWOM69enEP2GJqAC9Lx /htnKiuoMysQ3uepIMP0w3VDX41Y86JbZqUXqWsMI9shIO1O0wEVdWtYnk+G1F7K yT7QwaDKouZtqybtligx6w83udec+mUYQrhE32b7hsB3NrMsYkz7me+CuSj3Rx3q v0eJwi22QodNsbatjZSU0OuyhSmKV8Gmse6rJydYG2v/txvvqQv5fWpki7zf21yG A92/V5zjJMGy/QSxjSVSAxtgdYOhqdsozeZgZJ+ky9Ix7rCeoTXre5yZN7D/ga6q v222Am35ifOliAZl5/xDZ+ic5UG3t2D9+fRpf7Tzv/PvH78jzPjO9fsRs6i0oHVw s7wvygniLa4SJT4sueEDTOMtBLVkQY8JQpuerUBeE3SEQhNkmxt3pPL5bmgQsyPR W400D8vC5zdmmqhbSg9FKqkZagYBQtcDHY2PjMZ9zVGVSMeDliwMXq5Iu3sqUMCx 9PXjXfAoFrjTorMXXbEz7XFcmCJacWk2n26z79Ek9zxt1Pv11C44ECGTk+f+P3eo OISIikxqpD/THGwKKsZtDGoEa/M3bHVWUQCj9PwyxTaLfeg7+1BD5EgUgx7xWfnR deO0Keb44xwk5R/Q20FdgJpRxD3Xa7Idn4vSvLxFi4M9HByeOBs= =nBws -----END PGP SIGNATURE----- --eba4yV05fvKkAauo--