Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bz2bc-0005ZH-Nw for pgsql-bugs@arkaria.postgresql.org; Tue, 25 Oct 2016 14:21:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bz2bc-00063A-Ag for pgsql-bugs@arkaria.postgresql.org; Tue, 25 Oct 2016 14:21:32 +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_2) (envelope-from ) id 1bz2bb-000634-U7 for pgsql-bugs@postgresql.org; Tue, 25 Oct 2016 14:21:32 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bz2bX-0003zZ-2K for pgsql-bugs@postgresql.org; Tue, 25 Oct 2016 14:21:30 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 2674A21450; Tue, 25 Oct 2016 10:21:26 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Tue, 25 Oct 2016 10:21:26 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender; s= smtpout; bh=PNIvRBzCzo4qR/RrUsor5pa/qeM=; b=PlPqqVZOGWPI9x3MqIQp JWBcjyeF+J8ydGaErn158GI/NdfM2bJNoJg9GUAzvAsdg4WK29eD3OsgPRT4CKBz anFlfHiZCP0BnO7PHi4+tuiQLqEMKzlTJzHab18vWY2O/IBxnVN6BkdOmRAQlILy v7IJYCl3XPJ3ZZLIUvK1Sjg= X-ME-Sender: X-Sasl-enc: rzqXtP8e6YoLC35/jYeQ+CZ4B7IE1QKIxBDE/u3isKJL 1477405285 Received: from intern.anarazel.de (unknown [88.247.91.25]) by mail.messagingengine.com (Postfix) with ESMTPA id BC490F29CF; Tue, 25 Oct 2016 10:21:25 -0400 (EDT) Date: Tue, 25 Oct 2016 07:21:23 -0700 From: Andres Freund To: balaji.chithambaram@capitalone.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14395: sslmode=prefer not checking for certificate and allows connection as SSL Message-ID: <20161025142123.72avv5hxo224srmo@alap3.anarazel.de> References: <20161025135016.1423.14906@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161025135016.1423.14906@wrigleys.postgresql.org> X-Pg-Spam-Score: -2.5 (--) 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 2016-10-25 13:50:16 +0000, balaji.chithambaram@capitalone.com wrote: > The following bug has been logged on the website: > > Bug reference: 14395 > Logged by: Balaji Chithambaram > Email address: balaji.chithambaram@capitalone.com > PostgreSQL version: 9.5.4 > Operating system: Red Hat Enterprise Linux Server release 6.8 > Description: > > When we use default client method sslmode=prefer expected behaviour is to > try ssl connection by validating the certificate and then if it doesn't go > for non-SSL connection. But sslmode=prefer goes to SSL connection without > checking certificate provided. > > This gives an option if any servers ip configured for ssl connection can be > spoofed by with same ip, though we enforced ssl with certificate, it can > connect with out actual certificate and defeats the purpose. If somebody can MITM the connection, they can also fake not supporting SSL. sslmode=prefer simply isn't an adequate protection against that, and you need to use sslmode=verify-ca or verify-full. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs