From owner-freebsd-security@FreeBSD.ORG Sun Sep 2 23:57:19 2012 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D77F1065670 for ; Sun, 2 Sep 2012 23:57:19 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 0902A8FC0A for ; Sun, 2 Sep 2012 23:57:18 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so3568145wgb.31 for ; Sun, 02 Sep 2012 16:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=tkATNjNk6Q4KijnYM44zBPDT9Jbl9NMdU9ykXCZpgHM=; b=fMiN0Zd1dmKhTUwgB5cIqluqwEmYwOOXjDGAsfjBA0bEE3ggwaekRm2iWvQwXCBNo1 eJ5Fn6s8JnWiMuDVz+It7uwQCYb0Je0bQsBzlncm1koQl36cgzfbedMGe9uVb3re53ZU Iqcn4xmkgcIxAvzr/O/bVl4XwXcFh3nNVVhSHlSPgeJLoP2WcszQIrfic3XY4FILohdi GZTcxMNFkE2hB7i9yhqGJN+ArBZxxD54Ki1Yz3EBrslqt9gJFn3QuqyOnr18N0eEjtNj tuLmaLZAgIEE0c5sXC1h/b9xj3OIBvIwo8+xav928UF/OoMOXfqJGsua1D52RQ4SV2d9 Rk1Q== Received: by 10.180.84.104 with SMTP id x8mr19188268wiy.20.1346630232397; Sun, 02 Sep 2012 16:57:12 -0700 (PDT) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPS id l5sm23463854wix.5.2012.09.02.16.57.10 (version=SSLv3 cipher=OTHER); Sun, 02 Sep 2012 16:57:11 -0700 (PDT) Date: Mon, 3 Sep 2012 00:57:08 +0100 From: RW To: freebsd-security@freebsd.org Message-ID: <20120903005708.7082f230@gumby.homeunix.com> In-Reply-To: <5043DBAF.40506@FreeBSD.org> References: <201208221843.q7MIhLU4077951@svn.freebsd.org> <5043DBAF.40506@FreeBSD.org> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd8.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: svn commit: r239569 - head/etc/rc.d X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 23:57:19 -0000 On Sun, 02 Sep 2012 15:20:31 -0700 Doug Barton wrote: > On 08/22/2012 11:43, David E. O'Brien wrote: > > Author: obrien > > Date: Wed Aug 22 18:43:21 2012 > > New Revision: 239569 > > URL: http://svn.freebsd.org/changeset/base/239569 > > > > Log: > > Remove old entropy seeding after consumption > > initializing /dev/random PRNG. Not doing so opens us up to replay > > attacks. > > I object to this change, and would like to see it discussed more. No entropy file is effectively equivalent to a known file and anything is better than that. Simply writing out a new version of /entropy would be better. The more significant problem is that initrandom dumps some very low-grade entropy into /dev/random before the entropy file (see below). Since /dev/random has very limited buffering, and processes the buffers in a timed loop, it's almost certain that the first entropy file is completely discarded. IMO the order should be reversed or the low-grade stuff should be piped through sha256. # XXX temporary until we can improve the entropy # harvesting rate. # Entropy below is not great, but better than nothing. # This unblocks the generator at startup ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ | dd of=/dev/random bs=8k 2>/dev/null cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null # First pass at reseeding /dev/random. # case ${entropy_file} in [Nn][Oo] | '') ;; *) if [ -w /dev/random ]; then feed_dev_random "${entropy_file}" fi ;; esac