From owner-freebsd-security@FreeBSD.ORG Thu May 31 19:50:16 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 B7438106566C for ; Thu, 31 May 2012 19:50:16 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 68C9F8FC23 for ; Thu, 31 May 2012 19:50:16 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 8FDB37B6 for ; Thu, 31 May 2012 21:50:14 +0200 (CEST) Date: Thu, 31 May 2012 21:48:26 +0200 From: Pawel Jakub Dawidek To: freebsd-security@FreeBSD.org Message-ID: <20120531194825.GB1400@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="S1BNGpv0yoYahz37" Content-Disposition: inline X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: OpenSSL change for review. 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: Thu, 31 May 2012 19:50:16 -0000 --S1BNGpv0yoYahz37 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable As learned on someone else's mistakes, I'd like to ask for a review of those changes related to random data handling: http://people.freebsd.org/~pjd/patches/libc_arc4random.c.patch http://people.freebsd.org/~pjd/patches/openssl_rand_unix.c.patch The first patch changes arc4random() to use sysctl to obtain random data instead of opening /dev/random. The main reason here is to make it more sandbox-friendly. Once closed in sandbox, a process can no longer open files, so it has no access to proper random data. As a side-effect it should be a bit faster as instead of three system calls (open, read and close) we use only one (__sysctl). The second patch enables the use of libc's arc4random(3) in OpenSSL. After implementing the first one I found that OpenBSD's arc4random(3) also uses sysctl, but without fall back to /dev/random. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --S1BNGpv0yoYahz37 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/HywkACgkQForvXbEpPzRcZwCguqnhwuk92bUzZ1MJbMzsmqTV vckAoNAVukmnA14Q5r7+ZQGX+JqL69n/ =xy5c -----END PGP SIGNATURE----- --S1BNGpv0yoYahz37--