From owner-cvs-all@FreeBSD.ORG Fri Aug 15 12:22:05 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 71E2737B401; Fri, 15 Aug 2003 12:22:05 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F98C43FE1; Fri, 15 Aug 2003 12:22:04 -0700 (PDT) (envelope-from sam@errno.com) Received: from melange.errno.com (melange.errno.com [66.127.85.82]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.9) with ESMTP id h7FJM17N099322 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Aug 2003 12:22:03 -0700 (PDT) (envelope-from sam@errno.com) Date: Fri, 15 Aug 2003 12:22:03 -0700 From: Sam Leffler To: Mark Murray , Mike Silbersack Message-ID: <88806006.1060950123@melange.errno.com> In-Reply-To: <200308151911.h7FJBkOI003844@grimreaper.grondar.org> References: <200308151911.h7FJBkOI003844@grimreaper.grondar.org> X-Mailer: Mulberry/3.0.3 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/libkern arc4random.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 19:22:05 -0000 > Mike Silbersack writes: >> > How did you validate the this change? I strongly suggest that mods >> > like this need review before commit. Subtle problems can go unnoticed >> > for a long time. >> > >> > Sam >> >> I'm fairly confident that I did not add any bugs in this commit. >> However, I also have no way of knowing if arc4random was working >> correctly before the commit either... How hard would it be to hook up >> the randomness testing code you committed a few months back? If the >> testing code is in userland, perhaps we could export a /dev/arandom like >> openbsd does for simpler testing. > > I have not looked at the locking, but I have looked at this from a > randomness perspective. > > With that in mind, I think Mike did the right thing in making sure > that the first chunk of arcfour 'randomness' is ditched after a > rekey. It may be fixing a non-problem, but if there is an undisclosed > problem in determining the arcfour sequence, this helps thwart that. > > For the paranoids, this is cheap (almost free), and is solid from a > arcfour-neurotic perspective. I am not arguing for Mike to remove his change. I am noting that making changes to critical system components w/o review and/or testing is dangerous. Going forward we should have some tools for validating changes like this. If the output of arc4random is available through a sysctl or similar then it could be a tool that sits in /usr/src/tools/tools. Otherwise it would be good to create a test module or similar to shunt arc4random data through rndtest. Sam