From owner-freebsd-rc@FreeBSD.ORG Thu Sep 6 17:57:48 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 664) id 3FCF91065670; Thu, 6 Sep 2012 17:57:48 +0000 (UTC) Date: Thu, 6 Sep 2012 10:57:47 -0700 From: David O'Brien To: Dag-Erling =?unknown-8bit?B?U23DuHJncmF2?= Message-ID: <20120906175747.GC13179@dragon.NUXI.org> References: <201208221843.q7MIhLU4077951@svn.freebsd.org> <5043DBAF.40506@FreeBSD.org> <86y5kpcqc4.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86y5kpcqc4.fsf@ds4.des.no> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Arthur Mesh , freebsd-security@FreeBSD.org, Doug Barton , freebsd-rc@FreeBSD.org, Mark Murray Subject: Re: svn commit: r239569 - head/etc/rc.d X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 17:57:48 -0000 On Wed, Sep 05, 2012 at 01:37:15AM +0200, Dag-Erling Smrgrav wrote: > Speaking of rc.d and entropy, is the following code in /etc/rc.d/sshd > really necessary? > seeded=`sysctl -n kern.random.sys.seeded 2>/dev/null` > if [ "x${seeded}" != "x" ] && [ ${seeded} -eq 0 ] ; then > warn "Setting entropy source to blocking mode." ... > echo "Just hit for fast+insecure startup." > echo "====================================================" > sysctl kern.random.sys.seeded=0 2>/dev/null > read -t ${timeout} junk > echo "${junk}" `sysctl -a` `date` > /dev/random Likely this is inspired by 3.2 'How Compromises are Exploited', 'Compromise of High-Value Keys Generated From Compromised Key' paragraph. If the key that is being generated is vary valuable, the harm to the system owner can be very large. ... When we are about to generate a very valuable key, it is preferable to have what ever extra entropy there is in the PRNG's key. Therefore, the user can request en explicit reseed of the generator. Now that we have 'postrandom' possibly we should utilize the ${entropy_file} (and call postrandom again). Certainly [re]seeding with 'sysctl -a' and 'date' is poor and should be changed. -- -- David (obrien@FreeBSD.org)