Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aWX8b-00016K-N1 for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Feb 2016 22:33:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aWX8b-0005XG-8l for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Feb 2016 22:33:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWX8a-0005Wy-Kj for pgsql-bugs@postgresql.org; Thu, 18 Feb 2016 22:33:28 +0000 Received: from placid2.grammatech.com ([98.159.213.247] helo=placid.grammatech.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWX8T-0000Zq-E7 for pgsql-bugs@postgresql.org; Thu, 18 Feb 2016 22:33:27 +0000 Received: from placid.grammatech.com (unknown [192.168.219.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by placid.grammatech.com (Postfix) with ESMTPS id 211C8B20A9; Thu, 18 Feb 2016 17:33:20 -0500 (EST) Received: from [10.233.219.191] (barracuda.grammatech.com [192.168.219.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by placid.grammatech.com (Postfix) with ESMTPSA id 1465CB208B; Thu, 18 Feb 2016 17:33:20 -0500 (EST) Subject: Re: BUG #12799: libpq - SSL pqsecure_read() doesn't clean openssl error queue before reading To: Peter Geoghegan References: <20150224030956.2529.83279@wrigleys.postgresql.org> <54EDD30D.5050107@vmware.com> <319431910.43023.1425002429817.JavaMail.zimbra@4linux.com.br> <54F37769.3090406@iki.fi> <56C64197.6060408@grammatech.com> Cc: pgsql-bugs From: Dave Vitek Message-ID: <56C646AF.5010805@grammatech.com> Date: Thu, 18 Feb 2016 17:33:19 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2/18/2016 5:16 PM, Peter Geoghegan wrote: > On Thu, Feb 18, 2016 at 2:11 PM, Dave Vitek wrote: >> We independently ran into this, diagnosed it, and fixed it. Here is the >> complete patch covering every use of SSL_get_error. > I posted a patch for this issue independently, and quite recently: > > https://commitfest.postgresql.org/9/520/ > > Do you happen to have any idea why there has been an uptick in problem > reports about this recently, despite the fact that it's been an issue > for a while (that's been the case within Heroku, at least)? Are you > aware that there is some specific trend behind that? > I can only speak for my case. postgres is part of our CodeSonar product, and we are adding an option to have it use TLS sockets to talk to postgres. Maintainers: Peter's patch is better than mine, at least for the front end side. I also adjusted be-secure-openssl.c, which perhaps is not necessary, but then again it's hard to be sure. It might be worth doing a patch for be-secure-openssl.c in the spirit of what Peter did for the frontend (sorry, not volunteering :). -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs