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 1w9eFz-001cE6-0f for pgpool-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 07:20:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9eFx-007834-1F for pgpool-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 07:20:21 +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 1w9eFx-00782x-0j for pgpool-hackers@lists.postgresql.org; Mon, 06 Apr 2026 07:20:21 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w9eFu-00000000rY6-0gqd for pgpool-hackers@lists.postgresql.org; Mon, 06 Apr 2026 07:20:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:To:Message-Id:Date:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=wxaiurvpon/9RCr6P1rRQm2iXeEUCaQr0yqHfWDyE0g=; b=a+/GV5mmb3bSlhYxEcW2VmZaRj Ld/m46PyASw5+TZ8P9ZWLzWpaxL4/9hERiYL5WHdC+BVMf8iAdnVPMusCvrsY5nDs7cbEQ+wtyPzd lvkPujbYEJG1rzsFuhIa/CJ8pUQmrUcgSesbXk9b1fdkrnmQK7RUpDvrpL9fe2MXxX8lqpZhZ3sps yujx6WQCoNuGkiatGToVej2pxoOgzOPWfj9kT8RzGoukuDr3yrScNBFuw2s4JkU8Pw0/NmhOC+fbp QU3tHBb0jss8kQCcd1gElA/B7UyK7yRoGHTVf5Tg23bA6vJ8mPdeqEPgoX+G2pkVsBCKj30zKi811 9xCbfYfQ==; Received: from [2409:11:4120:300:471a:ae88:5670:b504] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w9eFr-001wHj-2v for pgpool-hackers@lists.postgresql.org; Mon, 06 Apr 2026 07:20:18 +0000 Date: Mon, 06 Apr 2026 16:20:06 +0900 (JST) Message-Id: <20260406.162006.817781254020976644.ishii@postgresql.org> To: pgpool-hackers@lists.postgresql.org Subject: Re: Memory leak in a SSL module From: Tatsuo Ishii In-Reply-To: <20260403.091842.102589579921239540.ishii@postgresql.org> References: <20260403.091842.102589579921239540.ishii@postgresql.org> X-Mailer: Mew version 6.8 on Emacs 29.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:471a:ae88:5670:b504 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > load_dh_file() leaks memory when supplied DH parameters are not valid. > It should have freed the memory returned by PEM_read_DHparams() using > DH_free(). The module was first imported from PostgreSQL (commit > 573bd08b99e277026e87bb55ae69c489fab321b8 2018/1/19) on 2019/6/18 by > commit 51bc494aaa7fd191e14038204d18effe2efb0ec8. PostgreSQL found the > memory leak later on and fixed it by commit > e835e89a0fd267871e7fbddc39ad00ee3d0cb55c on 2021/3/20. > > While I'm at it, the copyright notice in the same file is fixed. Since > the code was copied from PostgreSQL, we should retain the original > PostgreSQL copyright notice. > > Patch attached. Patch pushed. Regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp