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 1sbDga-00EvT8-5D for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2024 06:28:44 +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 1sbDgX-005l9p-Fd for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2024 06:28:41 +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 1sbDgX-005l9f-5S for pgsql-hackers@lists.postgresql.org; Tue, 06 Aug 2024 06:28:41 +0000 Received: from fout5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbDgU-003Pr1-UR for pgsql-hackers@postgresql.org; Tue, 06 Aug 2024 06:28:40 +0000 Received: from compute8.internal (compute8.nyi.internal [10.202.2.227]) by mailfout.nyi.internal (Postfix) with ESMTP id 504F5138FC77; Tue, 6 Aug 2024 02:28:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute8.internal (MEProxy); Tue, 06 Aug 2024 02:28:37 -0400 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=1722925717; x=1723012117; bh=T6oDFMKi2s zb0uPbtv/oi+DMz2Egkv8kVZsKJP1iTo8=; b=UhIrxhMjCd5y3kF8jhNy7/sHG7 Hr5MPOLjJSHZzz7p68H7SCr+HPWpqGOYoGZF8D2Kj7ZFhOR+iw77w80NdupfJS+5 pL8+ryqlYI0EbfHAZfd2va6zxAZbDrKp7xh2NEaxiE9hZEvw3FFY9d+BFF3OFAJc tCIP0NlSYQdSMcELAsMzkueSHfMG/GJsu5D2d3KyRKjTn3q8fwlhGL0B0/1Nvjfa Fv8eEVFiHCurfZ6UKJCuBKrTcXPoP0+tB7x7s/oLYt5o+ONtR7Oqm5UMi5l4FHkv KN5fnD21zI/nhJ30h+WApsq8okbekoI1rhv3aoVPdgtMDqUUkMZVGy/CkiBA== 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=1722925717; x=1723012117; bh=T6oDFMKi2szb0uPbtv/oi+DMz2Eg kv8kVZsKJP1iTo8=; b=M89JG0KfjtOKerlcFt599h4GDxN0OthOzVb803ZJnI9u naMg/ABLjbrIJqK3mTCyUGqwA69SUOfo2ADQxzP9hTr6isRlEyRa3BUdXH9EivgM 7kYatBpQ0z6c6u48YITIYmqM3XsruSKdtVUKuxWOHYqKdHnFNSK4yArRhpWq64ri AddmgK8TW7VZojRQLxWYgPQz6rvB6ZEBhfLdQGcfibWTopyT2fiqbDLyPL0uXcTp MBv56mDKCMYBRFAWDV+Ur+kH70tBYGPsxKD9ASEIogM8Wg10t7YzWKm9KVvy2mhr CCuP2l0I7P9HNyupO1bc+qre0a4C+lpF2cJp9l2y6g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrkeejgddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih iidpnhgspghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 6 Aug 2024 02:28:35 -0400 (EDT) Date: Tue, 6 Aug 2024 15:28:18 +0900 From: Michael Paquier To: Heikki Linnakangas Cc: Thomas Munro , pgsql-hackers Subject: Re: BlastRADIUS mitigation Message-ID: References: <16f78fce-66a8-44d2-90e3-ba68c9d63bad@iki.fi> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VzYozKW+3478UP8l" Content-Disposition: inline In-Reply-To: <16f78fce-66a8-44d2-90e3-ba68c9d63bad@iki.fi> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --VzYozKW+3478UP8l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 05, 2024 at 05:41:21PM +0300, Heikki Linnakangas wrote: > On 05/08/2024 15:43, Thomas Munro wrote: >> Since PostgreSQL v12 and v13 don't have the modern "common/hmac.h" >> API, I came up with a cheap kludge: locally #define those interfaces >> to point directly to the OpenSSL HMAC API, or just give up and drop >> Message-Authenticator support if you didn't build with OpenSSL support >> (in practice everyone does). Better ideas? >=20 > Seems reasonable. It probably wouldn't be hard to backport common/hmac.h > either, perhaps in a limited fashion with just md5 support. It's a bit more than just backporting hmac.h and hmac.c. hmac_openssl.c only depends on OpenSSL to do its business, but the=20 non-OpenSSL fallback implementation depends also on the cryptohash fallbacks for SHA-NNN and MD5. So you would also need the parts related to cryptohash.c, sha{1,2}.c, etc. Not really complex as these could be dropped as-is into the stable branches of 12 and 13, but not that straight-forward either as we had the bad idea to use the fallback MD5 implementation even if linking to OpenSSL in v12 and v13, meaning that you may need some tweaks to avoid API conflicts. Requiring OpenSSL and its HMAC APIs to do the job is much safer for a stable branch, IMO. -- Michael --VzYozKW+3478UP8l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmaxwoIACgkQnvQgOdby QH0cjhAAjfR5LAe2yATGlNYWh+tj/Z66YcFCb0XRdBLVYCUbrPVqcF1XF3fXui+O oO/woCuX9SVvWWlGssF7B53Yw9sxfLVQ63MgoXW2rdFNqZeT271jt4871CsJC8Oi EgdxaTWBJxFl23KeSTcePU+dkLHm2j4kM18QRGfnuwVQkzEGhkb/xP+32J7MW8c0 J33/PI/pRQVh4lnrc8zb8R7UjL+0533utQWB2XtOAOpnuPf+IsH95nfP6y6P/LUQ yFFhqQoNzj4bQTWS63mN58/O+Gx69zaTs+nN3jofpdBT+JlKMmiC7UwHJqAoWWip 1vaSvYVP+ggHRQYmzh9nyFX4uu5p41gi0NAASYUlVtgX1w6of9baERWV/ePPfmIQ mcChqtvKyj2kH3IXpsdma1qh2UfujTaFzmz9Mz2GCi2P60W2vwndHjgJbZxX8N7D da6ZyaXHGKEEr9Y/nUtObRhXJAnY+i2CYIFUdOuyAuZS/4YI/3JzQnvLmGOkjtI4 fbASwW7ngQm85keaEd5/5lIn/rv7pBTH3fhog2sF6gX1AHali7X/L0Y9jI6RRT0g PnYDDor6J6qVHaONH7eqVG0LUwl0ugXOIKbFHLTw9FMZWyFVErh3p1Goz5VH28AF Z8Ve6/kedhR2SY/kQCu2LIDwRaEXN0ydld2zalsg0H4rDZhSgZs= =Oe21 -----END PGP SIGNATURE----- --VzYozKW+3478UP8l--