From owner-freebsd-security@FreeBSD.ORG Fri Sep 26 12:55:47 2014 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACDB5D7F for ; Fri, 26 Sep 2014 12:55:47 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6740D7C7 for ; Fri, 26 Sep 2014 12:55:47 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XXUmh-0008HB-FT; Fri, 26 Sep 2014 16:38:03 +0400 Date: Fri, 26 Sep 2014 16:38:03 +0400 From: Slawa Olhovchenkov To: Chris Nehren Subject: Re: bash velnerability Message-ID: <20140926123803.GA30925@zxy.spb.ru> References: <00000148ab969845-5940abcc-bb88-4111-8f7f-8671b0d0300b-000000@us-west-2.amazonses.com> <54243F0F.6070904@FreeBSD.org> <54244982.8010002@FreeBSD.org> <20140925193555.GB28430@satori.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140925193555.GB28430@satori.lan> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: freebsd-security@freebsd.org X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2014 12:55:47 -0000 On Thu, Sep 25, 2014 at 03:35:55PM -0400, Chris Nehren wrote: > On Thu, Sep 25, 2014 at 11:57:38 -0500, Bryan Drewery wrote: > > 1. Do not ever link /bin/sh to bash. This is why it is such a big > > problem on Linux, as system(3) will run bash by default from CGI. > > I would think that this would cause other, more fundamental, > issues. FreeBSD's system don't expect /bin/sh to be bash, > and I wouldn't be surprised if they break for whatever reason. > > > 2. Web/CGI users should have shell of /sbin/nologin. > > 3. Don't write CGI in shell script / Stop using CGI :) > > 4. httpd/CGId should never run as root, nor "apache". Sandbox each > > application into its own user. > > And its own jail. Jails with ZFS are dirt cheap. For goodness of jail with ZFS we need fixing unionfs and devfs.