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 1r1mYf-00DdoO-Sv for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Nov 2023 11:53:49 +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 1r1mYc-007Ig1-GN for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Nov 2023 11:53:46 +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 1r1mYc-007If8-6s for pgsql-hackers@lists.postgresql.org; Sat, 11 Nov 2023 11:53:46 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r1mYU-005tLH-Jb for pgsql-hackers@lists.postgresql.org; Sat, 11 Nov 2023 11:53:45 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1482:3660:2ae7:2867:64d8:87dc]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4SSDc16Zsxz3FDS; Sat, 11 Nov 2023 12:53:37 +0100 (CET) Date: Sat, 11 Nov 2023 12:53:37 +0100 From: Christoph Berg To: Thomas Munro , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Don't trust unvalidated xl_tot_len. Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 Christoph