From owner-freebsd-security@FreeBSD.ORG Thu Apr 24 17:49:23 2014 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17D9C24C for ; Thu, 24 Apr 2014 17:49:23 +0000 (UTC) Received: from gproxy5-pub.mail.unifiedlayer.com (unknown [IPv6:2605:dc00:100:2::a5]) by mx1.freebsd.org (Postfix) with SMTP id CF84D1901 for ; Thu, 24 Apr 2014 17:49:22 +0000 (UTC) Received: (qmail 31027 invoked by uid 0); 24 Apr 2014 17:49:22 -0000 Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy5.mail.unifiedlayer.com with SMTP; 24 Apr 2014 17:49:22 -0000 Received: from box543.bluehost.com ([74.220.219.143]) by cmgw2 with id ttpG1n01936DqkS01tpKsF; Thu, 24 Apr 2014 11:49:20 -0600 X-Authority-Analysis: v=2.1 cv=Q9RBveGa c=1 sm=1 tr=0 a=m1eD20qHdBbyQr3wvGb0tQ==:117 a=m1eD20qHdBbyQr3wvGb0tQ==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=J0QyKEt1u0cA:10 a=oA0Jii2iB0UA:10 a=ZzjhlJrv0foA:10 a=kj9zAlcOel0A:10 a=hBmbxFWgAAAA:8 a=O5JQB85wRqYA:10 a=9NnC__TRAO0A:10 a=hKNOJcEOAAAA:8 a=70qzlKQjAAAA:8 a=-BsvhE_w4F0sME6eUggA:9 a=CjuIK1q_8ugA:10 a=--HJk1m7dRcA:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=apotheon.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=V0Hu/lpC9wlNtmW1szuFx/M7PjDBB4EOeEtrpiL3PC8=; b=Qm70CXGl6eRE/BfSLm1TiQ8rtZcBZg826LGgbQ39lvyXbjIAXaAxKOcOS4YfvzBkUuvIB1F6ly0MilgELfkwwmaTFnHyPVCjyzN6rXWihdDC+GhZ2/ndGmd6WEDLDaWM; Received: from [98.245.97.34] (port=60402 helo=localhost) by box543.bluehost.com with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1WdNlt-00014Z-Mk for freebsd-security@freebsd.org; Thu, 24 Apr 2014 11:49:17 -0600 Date: Thu, 24 Apr 2014 11:49:14 -0600 From: Chad Perrin To: freebsd-security@freebsd.org Subject: Re: OpenSSL static analysis, was: De Raadt + FBSD + OpenSSH + hole? Message-ID: <20140424174914.GC3850@glaze.hydra> Mail-Followup-To: freebsd-security@freebsd.org References: <23494.1398337629@server1.tristatelogic.com> <697C2D01-D8F7-4BC4-BBED-6B4A93105E62@cederstrand.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <697C2D01-D8F7-4BC4-BBED-6B4A93105E62@cederstrand.dk> User-Agent: Mutt/1.5.23 (2014-03-12) X-Identified-User: {2737:box543.bluehost.com:apotheon:apotheon.net} {sentby:smtp auth 98.245.97.34 authed with code@apotheon.net} X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 17:49:23 -0000 On Thu, Apr 24, 2014 at 01:59:10PM +0200, Erik Cederstrand wrote: > Den 24/04/2014 kl. 13.07 skrev Ronald F. Guilmette : > > > > Sir, does not the following trivial and obvious single line modification > > to the above code eliminate the warning? And does it not do so *without* > > the need for ``considerable effort''? > > > > int x = -1; > > > > I thank you for providing me with the example above, and thus also this > > opportunity to so perfectly illustrate my fundamental point. > > The example I gave is of course trivial to rewrite. It was the > shortest possible example I could think of to illustrate the > situation. It was condensed from a really convoluted if-else case > which was not incorrect but quite difficult to untangle. And yes, it's > laudable to rewrite it for the sake of readability, but it doesn't fix > any security issues. I'm generally of the opinion that, all else being equal, making your code readable is a way to find bugs you did not know existed. Even more amazingly, making your code readable fixes bugs that have not yet been written. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]