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.96) (envelope-from ) id 1wh4tC-0002Q8-35 for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 12:27:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wh4sA-000d10-3B for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 12:25:59 +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.96) (envelope-from ) id 1wh4sA-000d0p-0k for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 12:25:59 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wh4s6-000000002Bm-3lxj for pgsql-hackers@postgresql.org; Tue, 07 Jul 2026 12:25:58 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id 0AC1B1D00143; Tue, 7 Jul 2026 08:25:52 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Tue, 07 Jul 2026 08:25:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=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:subject:subject:to:to; s=fm1; t=1783427151; x=1783513551; bh=mH7gwiPgVv6DJaIExRdfc23TT/zlQJ1xcMNSAH7zr+A=; b= v6x3uHDg5tXCnABEWn+UlbWjRvQ5BRY26G0tFpYQPxZ/eG87BrM0puUnKAFvNU2J uXSQnarWLmBgo/et0JMOs2cwCgBuNEXPjpy+zpAUcsLFVOjfr8weRamT2EwwlQg4 u394puGEmE2XsoFxjU8IVXG7Psi2kpnTKRjn8ylGAA7zRWCM7L/eMijp5o1jkqdy yyM9r0Kcfnj01LQ0Sq7jww/FjBIE1vAqvM7j91xF9eXZmr+31HlhlktZyjipsviF tG3I1Up7nHOWPZRQ4IIfGj1gSna+tt8rZPfHQ7WcBBXKNxIxb3LQbwm9feS+3wyu lfNgtsQV5hPN1ziBgHCLXQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1783427151; x=1783513551; bh=m H7gwiPgVv6DJaIExRdfc23TT/zlQJ1xcMNSAH7zr+A=; b=brh8MWG58tSusGxsU 5cxxZYa50FatiuTyVirqZvTLyiqfllluPb58QEMWace2mAJaZWySmNA2VB+JPgxx u6H6p7zKUSF/AwSc1/SdFp5S1ktcy7/t2g0nN9neeXv3TWikhSuyXb2jf59cbhFH EGnzXNUzygyrZCY3aKN7PEb2hA6w+vnBOF7Wph8PdXpqeba8WJBp/R+4cCcLDGXc GSMLPovJTOvIa/gqBqhL8gBFkT1Kd1lt/S16jMtF6sZhT+KBazbt8x9evVV5oOxB 253kpHILoIibDGnoB6FsYAOo84SWaOu5LRwxdmylAB9bdv2HZc1gZppWWn8IhQe6 6S+gQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGwqZngFqzdB6K9P3moa4hG8hMYg0cD7smosAcQjGbQXLN8oaNBCUfD5Ij2SIWrQs yqYlTYM7vyQPuqj33qtu0oLlwh0lek75nFRo3Zt71MJWfCrOFrkSzg2EA/qxJeHbW580Dj nR1XYC+aL4ilo9WK2Hy0Z7EWFK3ksldPtlnmFVj3xe+oZzv5Eqg9/ckFDaLFBMAYNkX8PK u+Fdib6oI3TFOMrvNKfKva+SpG+JF1Yn1ReAt153bvudeHTRfD0lWkFCzX+WMY0p1iQEXe QxJdDhQWZL7rFIZDEEndgBONbITQsxt6m8eN2vLsuZdFWUpdqTGDcPcqtxP4T+RG5G82t9 ddDglj91XmxebKl+zqQFUoXEa2XY5wl61iEycfe4mpOZj2oyUN1S+kwb1bnWQ7OhR55l8+ 3623uLYie35ZeOF96C6ZxXCSNKVgeecOCUS+CS+B5AnUqlcRiWODyFG0/W2WGs4A+xfoPO 0BSFJ8otsAP2uVH3qiHWXjBf9l+vKs3lnfcqcxvAbP2x6xyQRHWRCbA4jPPblVj1pzCoq3 1lVEJsWHq5k6/gQ1tjsnjgZRiz2dKnR5uaqThpP06hheWSsVT128r1/2OTPPso8S5Ko1Lb MCq/tQme7KODr0FbBEq3GNqBSrj5w7ytE/8Rq3DHb3y2+kMDOmseFQrjR1/A X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jul 2026 08:25:50 -0400 (EDT) Message-ID: Date: Tue, 7 Jul 2026 14:25:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Increased SECURITY RISCS from omitting some compikler options when building PG with meson; e.g. -fcf-protection=full To: Hans Buschmann , "pgsql-hackers@postgresql.org" References: <01e60576b689490a9388b3d840f23cd8@nidsa.net> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <01e60576b689490a9388b3d840f23cd8@nidsa.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 07.07.26 11:59, Hans Buschmann wrote: > Some days ago I stumbled over the following Phoronix article with a > proposal for Fedora 45: > > Fedora 45 Considering x86_64 Shadow Stack Usage By Default www.phoronix.com/news/Fedora-45-Consider-Shadow-Stack> > I exemplary checked both the Fedora provided packages and the PGDG > provided packages  of pg18 that they are build with Schadow Stack > (SHSTK) and Indirect Branch Tracking  (IBT) activated which is true. > It may sometimes be necessary that a quick fix of an apparent bug > encourages the user to recomple the specific component of postgres. The > different compile options result in  that the operating system provided > protection can not be guaranteed. > > I have discovered this case on x86_64 pg18 on linux built with meson but > I don't know if other architectures have similar mitigations enabled in > the distributed binaries. > > As I am not an experienced C-Programmer, there may be other compile > options for other vulnerabilities. > > I propose to activate all compiler options as default that are used in > the binary releases of postgres, preferrably in both built systems > (autoconfigure and meson) > > Please consider different operating systems (red hat, debian etc), all > supported pg versions, different architectures, different compilers, > different built systems etc. I don't think this would be a good direction. Distributions are in many cases better placed to decide when and how to activate certain protections. The case you point out here is a good example. The -fcf-protection option was already activated in Fedora 28, but it is only now that they are considering switching over the base layers of the OS to activate this facility. It would be unreasonable to expect PostgreSQL and any other open-source project to track this and sync up with this. Consider this to see the amount of information that would need to be tracked and implemented: https://github.com/jvoisin/compiler-flags-distro