From owner-freebsd-security@FreeBSD.ORG Tue Dec 24 20:44:35 2013 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 C830CA64; Tue, 24 Dec 2013 20:44:35 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A77101F12; Tue, 24 Dec 2013 20:44:35 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 2D541263E3; Tue, 24 Dec 2013 12:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1387917875; bh=6T8/oAxqiws9fdXhphx7ojIsXC9J4bJkA7xDP/mfoRg=; h=Date:From:Reply-To:To:CC:Subject; b=AfJU+UAxds1Suuc+kBOzTUpYE1sf6rNlnJIip3586WQA1Wp0dpR0v+MIVQTQLfybq UmtpzTD1F/RRXMp+yaebMmeS3QtZoI5e/y0ysyyC/g7bhxf+zA7GFDJx1N8HFUpD7L pOLSzSh8xmZGLXMEhKuSK1P7rBXAM7GJVHV9qgGw= Message-ID: <52B9F232.1090002@delphij.net> Date: Tue, 24 Dec 2013 12:44:34 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: "freebsd-security@freebsd.org" Subject: [PATCH RFC] Disable save-entropy in jails X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Current , Pawel Jakub Dawidek X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: d@delphij.net List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 20:44:35 -0000 Hi, I think we shouldn't save entropy inside jails, as the data is not going to be used by rc script (pjd@126744). If there is no objections, I will commit this changeset on January 1, 2014. Index: libexec/save-entropy/save-entropy.sh =================================================================== --- libexec/save-entropy/save-entropy.sh (revision 259828) +++ libexec/save-entropy/save-entropy.sh (working copy) @@ -42,6 +42,10 @@ elif [ -r /etc/rc.conf ]; then . /etc/rc.conf 2>/dev/null fi +if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then + exit 0 +fi + case ${entropy_dir} in [Nn][Oo]) exit 0 Cheers, -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-freebsd-security@FreeBSD.ORG Tue Dec 24 22:36:04 2013 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7419F450; Tue, 24 Dec 2013 22:36:04 +0000 (UTC) Received: from hoffman.proper.com (IPv6.Hoffman.Proper.COM [IPv6:2605:8e00:100:41::81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4901515FC; Tue, 24 Dec 2013 22:36:04 +0000 (UTC) Received: from [10.20.30.90] (50-0-66-41.dsl.dynamic.sonic.net [50.0.66.41]) (authenticated bits=0) by hoffman.proper.com (8.14.7/8.14.7) with ESMTP id rBOMZuGj057974 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 24 Dec 2013 15:35:57 -0700 (MST) (envelope-from phoffman@proper.com) X-Authentication-Warning: hoffman.proper.com: Host 50-0-66-41.dsl.dynamic.sonic.net [50.0.66.41] claimed to be [10.20.30.90] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: [PATCH RFC] Disable save-entropy in jails From: Paul Hoffman In-Reply-To: <52B9F232.1090002@delphij.net> Date: Tue, 24 Dec 2013 14:36:10 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <278988C7-1749-413D-A5E2-ABE6753B3766@proper.com> References: <52B9F232.1090002@delphij.net> To: d@delphij.net X-Mailer: Apple Mail (2.1827) Cc: "freebsd-security@freebsd.org" , FreeBSD Current , Pawel Jakub Dawidek X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 22:36:04 -0000 On Dec 24, 2013, at 12:44 PM, Xin Li wrote: > I think we shouldn't save entropy inside jails, as the data is not = going > to be used by rc script (pjd@126744). If there is no objections, I = will > commit this changeset on January 1, 2014. Even if it is not used by an rc script, it might be used by some = userland program (running as root, of course) that knows about the = directory and wants some fresh entropy for its own use. Is there a problem with saving the directory in jails? It certainly = isn't taking up much space. --Paul Hoffman= From owner-freebsd-security@FreeBSD.ORG Tue Dec 24 22:53:26 2013 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87D048A4; Tue, 24 Dec 2013 22:53:26 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62C32170F; Tue, 24 Dec 2013 22:53:26 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id E8BD126B4E; Tue, 24 Dec 2013 14:53:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1387925606; bh=0Vw6lR0AUAvC7oIl+vtMZ2qrS2TzJ4eYNIDP/PBCXs4=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=OO1NBUj+UndVY9VdVmrxYiNIgzIDSN50f7Ci45i7gwgBgo0jR3K7B9flxi/oA2Yw9 2gUeWOq05e1PgB+9uuP0C73vPRrjfSjZpcTMFkT1AaCb3oKtH3xeH6AsoNX0WP3Ynd SUvYeueSDhstRp2b0RLZzPKmEDegxKAWS3I2gBj0= Message-ID: <52BA1065.6000403@delphij.net> Date: Tue, 24 Dec 2013 14:53:25 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Paul Hoffman , d@delphij.net Subject: Re: [PATCH RFC] Disable save-entropy in jails References: <52B9F232.1090002@delphij.net> <278988C7-1749-413D-A5E2-ABE6753B3766@proper.com> In-Reply-To: <278988C7-1749-413D-A5E2-ABE6753B3766@proper.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-security@freebsd.org" , FreeBSD Current , Pawel Jakub Dawidek X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: d@delphij.net List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 22:53:26 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 12/24/13 14:36, Paul Hoffman wrote: > On Dec 24, 2013, at 12:44 PM, Xin Li wrote: > >> I think we shouldn't save entropy inside jails, as the data is >> not going to be used by rc script (pjd@126744). If there is no >> objections, I will commit this changeset on January 1, 2014. > > Even if it is not used by an rc script, it might be used by some > userland program (running as root, of course) that knows about the > directory and wants some fresh entropy for its own use. Why a userland application would want to use these? Would you mind elaborating what kind of use that would be? My understanding is that the saved entropy is used for bootstraping the system only: any applications that wants good random numbers should just use /dev/random because relying on something saved on disk is the worst way for someone who wants more entropy. > Is there a problem with saving the directory in jails? It > certainly isn't taking up much space. No, it's not about space. What I am concerned is that it may have wasted entropy: each time (every */11 minute) the system would get 2048 bytes out from /dev/random per jail. This deterministic behavior may trigger reseeds earlier than wanted. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJSuhBlAAoJEJW2GBstM+nss7YQAIYcMq6GflgY7T304J+bdoll TBYA740eQy6iNoyGTSh4VEeKh5GDrwX7GAM5EshrDQMKfagwm0smdYbpWYklUc07 V6sy8uuIvhxM6GOxQqP86tyzMCu9EtiVzfDakKJz1IL8pzVuu6Kbq/CxdA3fC3G4 qQraPMHvpYRsXiOn30B8i0kojMgRAxMOTZRZ4HRByiuZrsVdFYlNxMoh76reMO40 dSq1UPmQMjeDqlEKkAxpR1nN67ebVgFOuXl8O/YjOvNJLnCtcEr6xQcUQso8cbeR j7WCgUmiqCKcoPcE6Bf43Qp1otdeLVP+qoeogWcAPIPrK6XL2wxsVxj6Y44fbkeW Ttfw5iXwR7yt7MSZHP4eXdycZuSRswQUzp9TEyAxclMTE+aHFd0B/C4lViTKTfU1 dglg5goplXCAVCFPXek+R9UnFCFSc9GvlSL2K2d5TNvjDiVdNGc9SDyO7u0qNxV5 Eo+X8W2oR05jiZNHitJyalZSWd62+rn5+R5Pwf3A0hv9opimNX2xVTpfVU7y7DoK dJpPo7S8GvVKK0JgnP9yOvAD2wIjNnLz0T+hmmnygPA+xkrbVZIYdxMxrMQ491Dm /3dej3hDg5panfU7kxjpVmA+mTQbaFwQJeV0gSJDeswBl8JeAwhycchA+rgpPWCN qEziEr9sgMQKdc6JyVf9 =b7jA -----END PGP SIGNATURE----- From owner-freebsd-security@FreeBSD.ORG Tue Dec 24 23:25:57 2013 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 5C8D3214; Tue, 24 Dec 2013 23:25:57 +0000 (UTC) Received: from hoffman.proper.com (IPv6.Hoffman.Proper.COM [IPv6:2605:8e00:100:41::81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1681418E7; Tue, 24 Dec 2013 23:25:56 +0000 (UTC) Received: from [10.20.30.90] (50-0-66-41.dsl.dynamic.sonic.net [50.0.66.41]) (authenticated bits=0) by hoffman.proper.com (8.14.7/8.14.7) with ESMTP id rBONPonD058846 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 24 Dec 2013 16:25:52 -0700 (MST) (envelope-from phoffman@proper.com) X-Authentication-Warning: hoffman.proper.com: Host 50-0-66-41.dsl.dynamic.sonic.net [50.0.66.41] claimed to be [10.20.30.90] Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: [PATCH RFC] Disable save-entropy in jails From: Paul Hoffman In-Reply-To: <52BA1065.6000403@delphij.net> Date: Tue, 24 Dec 2013 15:26:06 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <52B9F232.1090002@delphij.net> <278988C7-1749-413D-A5E2-ABE6753B3766@proper.com> <52BA1065.6000403@delphij.net> To: d@delphij.net X-Mailer: Apple Mail (2.1827) Cc: "freebsd-security@freebsd.org" , FreeBSD Current , Pawel Jakub Dawidek X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 23:25:57 -0000 On Dec 24, 2013, at 2:53 PM, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 >=20 > On 12/24/13 14:36, Paul Hoffman wrote: >> On Dec 24, 2013, at 12:44 PM, Xin Li wrote: >>=20 >>> I think we shouldn't save entropy inside jails, as the data is >>> not going to be used by rc script (pjd@126744). If there is no=20 >>> objections, I will commit this changeset on January 1, 2014. >>=20 >> Even if it is not used by an rc script, it might be used by some=20 >> userland program (running as root, of course) that knows about the=20 >> directory and wants some fresh entropy for its own use. >=20 > Why a userland application would want to use these? Would you mind > elaborating what kind of use that would be? I don't have a specific application in mind, and certainly not one for a = jail. However, I'm not sure what the value in removing a feature for a = jail if we don't know if anyone is using that feature. Thus, my = question. > My understanding is that the saved entropy is used for bootstraping > the system only: any applications that wants good random numbers > should just use /dev/random because relying on something saved on disk > is the worst way for someone who wants more entropy. Quite true. Note, however, that we don't delete the saved entropy after = booting and add it just before shutdown: we leave it there for some = reason. I'm not sure why a jail is so different of an environment that = it should be treated differently than a normal (non-jail) environment. = Maybe there is a reason, but I'm not seeing it. >> Is there a problem with saving the directory in jails? It >> certainly isn't taking up much space. >=20 > No, it's not about space. What I am concerned is that it may have > wasted entropy: each time (every */11 minute) the system would get > 2048 bytes out from /dev/random per jail. This deterministic behavior > may trigger reseeds earlier than wanted. I did not understand this. What changes in the system does removing = /var/db/entropy cause? (If this is answered in a longer article, a = pointer to it would be useful to me (and maybe others).) --Paul Hoffman= From owner-freebsd-security@FreeBSD.ORG Tue Dec 24 23:38:00 2013 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 781C96E2; Tue, 24 Dec 2013 23:38:00 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4CC8719EB; Tue, 24 Dec 2013 23:37:59 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rBONbmYE047167 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 24 Dec 2013 15:37:49 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rBONbmbD047166; Tue, 24 Dec 2013 15:37:48 -0800 (PST) (envelope-from jmg) Date: Tue, 24 Dec 2013 15:37:48 -0800 From: John-Mark Gurney To: Paul Hoffman Subject: Re: [PATCH RFC] Disable save-entropy in jails Message-ID: <20131224233748.GA99167@funkthat.com> Mail-Followup-To: Paul Hoffman , d@delphij.net, "freebsd-security@freebsd.org" , FreeBSD Current , Pawel Jakub Dawidek References: <52B9F232.1090002@delphij.net> <278988C7-1749-413D-A5E2-ABE6753B3766@proper.com> <52BA1065.6000403@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 24 Dec 2013 15:37:49 -0800 (PST) Cc: "freebsd-security@freebsd.org" , FreeBSD Current , d@delphij.net, Pawel Jakub Dawidek X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 23:38:00 -0000 Paul Hoffman wrote this message on Tue, Dec 24, 2013 at 15:26 -0800: > On Dec 24, 2013, at 2:53 PM, Xin Li wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA512 > > > > On 12/24/13 14:36, Paul Hoffman wrote: > >> On Dec 24, 2013, at 12:44 PM, Xin Li wrote: > >> > >>> I think we shouldn't save entropy inside jails, as the data is > >>> not going to be used by rc script (pjd@126744). If there is no > >>> objections, I will commit this changeset on January 1, 2014. > >> > >> Even if it is not used by an rc script, it might be used by some > >> userland program (running as root, of course) that knows about the > >> directory and wants some fresh entropy for its own use. > > > > Why a userland application would want to use these? Would you mind > > elaborating what kind of use that would be? > > I don't have a specific application in mind, and certainly not one for a jail. However, I'm not sure what the value in removing a feature for a jail if we don't know if anyone is using that feature. Thus, my question. Technically we couldn't fix any odd behavior in the system if we used this as a test... Oh, I don't know if anyone is depending upon this non-standard behavior of , guess we can't fix it... If someone depends upon this behavior, they probably already knew enough about the system to figure out what went wrong in the first place... > > My understanding is that the saved entropy is used for bootstraping > > the system only: any applications that wants good random numbers > > should just use /dev/random because relying on something saved on disk > > is the worst way for someone who wants more entropy. > > Quite true. Note, however, that we don't delete the saved entropy after booting and add it just before shutdown: we leave it there for some reason. I'm not sure why a jail is so different of an environment that it should be treated differently than a normal (non-jail) environment. Maybe there is a reason, but I'm not seeing it. There is a reason to keep the file around. If you don't shutdown your system cleanly, at least you have entropy from the last boot, instead of a minimal amount... > >> Is there a problem with saving the directory in jails? It > >> certainly isn't taking up much space. > > > > No, it's not about space. What I am concerned is that it may have > > wasted entropy: each time (every */11 minute) the system would get > > 2048 bytes out from /dev/random per jail. This deterministic behavior > > may trigger reseeds earlier than wanted. > > I did not understand this. What changes in the system does removing /var/db/entropy cause? (If this is answered in a longer article, a pointer to it would be useful to me (and maybe others).) Basicly we don't drain the entropy pool as quickly, leaving better entropy in the system, and preventing an attacker from not having to do as much work controlling external inputs to the system to possibly attack the pool... My vote to remove it. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-security@FreeBSD.ORG Wed Dec 25 00:04:54 2013 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 747A6B7D; Wed, 25 Dec 2013 00:04:54 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 53E971C9C; Wed, 25 Dec 2013 00:04:54 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id B340926F99; Tue, 24 Dec 2013 16:04:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1387929893; bh=eeS15T/iqC+rl8QEVvnpaFWBhjRYZIm92WjrlX2S//4=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=DNcJ0AZDGWMqncuNOXgrqPW312FasZm06BoRDxOrxGc+CjTYCU9Okhqnk1clLYsE6 mlg3qpnwOOzAPJ2YtOxFA9bqOAoDU4aerbNDpvb0vBlkURglpnFj85UVORpx4Ibc1a 2TerPpNl5JLoAGybjo0reQVvQKSEnalJAy46C5T0= Message-ID: <52BA2125.8050404@delphij.net> Date: Tue, 24 Dec 2013 16:04:53 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Paul Hoffman , d@delphij.net Subject: Re: [PATCH RFC] Disable save-entropy in jails References: <52B9F232.1090002@delphij.net> <278988C7-1749-413D-A5E2-ABE6753B3766@proper.com> <52BA1065.6000403@delphij.net> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-security@freebsd.org" , FreeBSD Current , Pawel Jakub Dawidek X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: d@delphij.net List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 00:04:54 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 12/24/13 15:26, Paul Hoffman wrote: > On Dec 24, 2013, at 2:53 PM, Xin Li wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 >> >> On 12/24/13 14:36, Paul Hoffman wrote: >>> On Dec 24, 2013, at 12:44 PM, Xin Li >>> wrote: >>> >>>> I think we shouldn't save entropy inside jails, as the data >>>> is not going to be used by rc script (pjd@126744). If there >>>> is no objections, I will commit this changeset on January 1, >>>> 2014. >>> >>> Even if it is not used by an rc script, it might be used by >>> some userland program (running as root, of course) that knows >>> about the directory and wants some fresh entropy for its own >>> use. >> >> Why a userland application would want to use these? Would you >> mind elaborating what kind of use that would be? > > I don't have a specific application in mind, and certainly not one > for a jail. However, I'm not sure what the value in removing a > feature for a jail if we don't know if anyone is using that > feature. Thus, my question. I see. >> My understanding is that the saved entropy is used for >> bootstraping the system only: any applications that wants good >> random numbers should just use /dev/random because relying on >> something saved on disk is the worst way for someone who wants >> more entropy. > > Quite true. Note, however, that we don't delete the saved entropy > after booting and add it just before shutdown: we leave it there > for some reason. I'm not sure why a jail is so different of an > environment that it should be treated differently than a normal > (non-jail) environment. Maybe there is a reason, but I'm not seeing > it. Definitely not for seeding some userland applications :) If the application wants secure random numbers, it should rely on /dev/random because it has more entropy sources and is less predicable. >>> Is there a problem with saving the directory in jails? It >>> certainly isn't taking up much space. >> >> No, it's not about space. What I am concerned is that it may >> have wasted entropy: each time (every */11 minute) the system >> would get 2048 bytes out from /dev/random per jail. This >> deterministic behavior may trigger reseeds earlier than wanted. > > I did not understand this. What changes in the system does removing > /var/db/entropy cause? (If this is answered in a longer article, a > pointer to it would be useful to me (and maybe others).) No, we are not talking about removing /var/db/entropy. What I am proposing to do is to disable entropy savings from jails. Here is why: The way a PRNG works is that it uses one or many entropy sources to "feed" its internal state, and generate a series of pseudo-random numbers from the internal state via a PRF. FreeBSD collects entropy from several sources: Ethernet, interrupts, software interrupts, etc., as well as hardware RNG that is available to the system, and use all these entropy to derive the internal state of its PRNG. When reading from /dev/random, one essentially consumes entropy that is fed into the random device, and eventually it would cause a reseed. In an ideal world, we would want this to be less predicable and controllable from a potential attacker. Normal applications tends to read /dev/random in small bites, and do so in a discrete and nearly random manner, assuming we have a lot of processes running. Saving entropy, on the other hand, happen in larger chunks at a determined time. With multiple jails running, one would have a lot of big chunk reads from the /dev/random device, making its behavior more deterministic, which could have bad consequences. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJSuiElAAoJEJW2GBstM+nsW8wP/iJOuLK7gl4xcaZ0WQM9ZbcF dRo9Wuao4aytIPNcI7BcRvFPkQIVd/N6tIwmi98Uy3vLG1FAkZlSkPT9IXGWKwtX lil1tfPlGt4+lMPirD7AFkk99DUfMO7nY2TuWw6DG6w6gfbzoBkZfxEZTTBv5XXl ZtNMsw2CR6xOOY2YTx3HobSnnr4UzwBzT1nif+7W/pYTwQB2LNbnwnVqoDsGn9mv MMO/9WnYs3/smYDQdChmmybGws4/P53sGjIzds/dv3Gg8ce8fu/ZAPFGCKRzr+uL CTBCBuaeiRM/BhlG3n6H0o4updgDAOQ0PDH0q6rMXwcg7ODz6tW2x7lJ5hwm/Z2B nrPCr5p2jk5KE8ULjINypYyIgjbPcgDTZN2ToB+a83RvIf9/DlRMzyOA76b0KsEs AnygLyG/ZoBqy5s4nrNbLyNERx2T7hrcrGtK4qtMIdpYQK8T/etZZvIebLVPvCGK kGG9AEgiUYHgG0RASg0LtsiJLi0/LjGzwZl+/Q3lqjrcmV7m6jOLAMT349aWOep9 GXPOcBXxh4emEz2qAQRSn7Y+Xn0T80lIPHb/6Wz04pOIhlMwQPR97X+IfAtybHFf 7HVk4GfhQC/zDiwPKb5Qcx7JRnE3wBZ2vnVaVzPCk9uPImyvMYKDKiNfFl2zlFfS AdjiKPaOGw2kAZA55dC3 =7Ruf -----END PGP SIGNATURE----- From owner-freebsd-security@FreeBSD.ORG Wed Dec 25 12:37:53 2013 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A12BA618; Wed, 25 Dec 2013 12:37:53 +0000 (UTC) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6059E12B1; Wed, 25 Dec 2013 12:37:53 +0000 (UTC) Received: from [197.87.92.126] (helo=[192.168.0.6]) by gromit.grondar.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VvniS-000Aur-P2; Wed, 25 Dec 2013 12:37:42 +0000 Subject: Re: [PATCH RFC] Disable save-entropy in jails Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: multipart/signed; boundary="Apple-Mail=_17113B37-5154-4D04-A822-FC5C92A4DA40"; protocol="application/pgp-signature"; micalg=pgp-sha512 From: Mark R V Murray In-Reply-To: <52BA2125.8050404@delphij.net> Date: Wed, 25 Dec 2013 14:37:17 +0200 Message-Id: <22790868-E1B1-4130-83DB-E5CD86DD40A4@grondar.org> References: <52B9F232.1090002@delphij.net> <278988C7-1749-413D-A5E2-ABE6753B3766@proper.com> <52BA1065.6000403@delphij.net> <52BA2125.8050404@delphij.net> To: d@delphij.net X-Mailer: Apple Mail (2.1827) X-SA-Score: -1.0 X-Mailman-Approved-At: Wed, 25 Dec 2013 13:00:03 +0000 Cc: "freebsd-security@freebsd.org" , Paul Hoffman , Pawel Jakub Dawidek , FreeBSD Current X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 12:37:53 -0000 --Apple-Mail=_17113B37-5154-4D04-A822-FC5C92A4DA40 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 25 Dec 2013, at 02:04, Xin Li wrote: > No, we are not talking about removing /var/db/entropy. What I am > proposing to do is to disable entropy savings from jails. Here is = why: >=20 > The way a PRNG works is that it uses one or many entropy sources to > "feed" its internal state, and generate a series of pseudo-random > numbers from the internal state via a PRF. >=20 > FreeBSD collects entropy from several sources: Ethernet, interrupts, > software interrupts, etc., as well as hardware RNG that is available > to the system, and use all these entropy to derive the internal state > of its PRNG. >=20 > When reading from /dev/random, one essentially consumes entropy that > is fed into the random device, and eventually it would cause a reseed. > In an ideal world, we would want this to be less predicable and > controllable from a potential attacker. So far so good. :-) > Normal applications tends to read /dev/random in small bites, and do > so in a discrete and nearly random manner, assuming we have a lot of > processes running. Saving entropy, on the other hand, happen in > larger chunks at a determined time. With multiple jails running, one > would have a lot of big chunk reads from the /dev/random device, > making its behavior more deterministic, which could have bad = consequences. I doubt it goes as far as =93bad=94, but it certainly does no good. I would support the notion of not caching entropy in jails IFF this didn=92t leak out and prevent harvesting in the jail=92s host AND this gave a noticeable simplification of script code. M --=20 Mark R V Murray --Apple-Mail=_17113B37-5154-4D04-A822-FC5C92A4DA40 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - http://gpgtools.org iQCVAwUBUrrRgd58vKOKE6LNAQqTmAP+PFDENFpW/rAJu2PFJBlYv+fexNFTiVG0 6IbkeollEsAOZc5mFI0ehdGzcohgw986usl7zxWSc0PntiIQNR2Z7VMEM3f9tZJy +bvxG3M2VlgMEmVwZqouuoZlz56f4CBQoi6x6FlNGDQWpErxDfvdj+ZiudpkKf3n 2NZW6fyD/PY= =OelK -----END PGP SIGNATURE----- --Apple-Mail=_17113B37-5154-4D04-A822-FC5C92A4DA40-- From owner-freebsd-security@FreeBSD.ORG Wed Dec 25 18:46:16 2013 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D45DE3D6 for ; Wed, 25 Dec 2013 18:46:16 +0000 (UTC) Received: from mail-we0-x232.google.com (mail-we0-x232.google.com [IPv6:2a00:1450:400c:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A9AB19FA for ; Wed, 25 Dec 2013 18:46:16 +0000 (UTC) Received: by mail-we0-f178.google.com with SMTP id u57so6693786wes.23 for ; Wed, 25 Dec 2013 10:46:14 -0800 (PST) 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:mime-version :content-type:content-transfer-encoding; bh=qzcTRr+g9LTJ6DBm8+YrM4GtKdXDF2Zx52BEqUPWUyw=; b=lgbmYqqT8YB/4vW8p02onFNbZkkflr5Hgwg6yWVwNPYBwZZ0gWZeE1IzKsl0eggy+I V17UJ+Be3x4TgZ8bv6ZIlpeovaV4GsQQH5p64JFvHpFeFBw8ySFRTQR4eEd8S6u05uWz TNneTZVHoT3H9Rnt7jvlVpD+94aGxMJYrugTG3bW5f7kw0lntKm4C3fE44q15UZ03kqs 6K76PaHYTzfkQVmHlZ8umP7LAclwSrLx+GfT++Qt1pWWUV20uZvB35BBaTLiU0S+p5Bo XLGsLc8vkWGDJlB+n+LnnXdRm8rzdv6mpPl6eFaAa0yvRevkMelwFCO/eDKD/HKRHZ/W 8igw== X-Received: by 10.180.73.78 with SMTP id j14mr3292420wiv.11.1387997174752; Wed, 25 Dec 2013 10:46:14 -0800 (PST) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPSA id cy10sm15224743wjb.6.2013.12.25.10.46.13 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 25 Dec 2013 10:46:14 -0800 (PST) Date: Wed, 25 Dec 2013 18:46:11 +0000 From: RW To: freebsd-security@freebsd.org Subject: Re: [PATCH RFC] Disable save-entropy in jails Message-ID: <20131225184611.5acbd23e@gumby.homeunix.com> In-Reply-To: <52BA2125.8050404@delphij.net> References: <52B9F232.1090002@delphij.net> <278988C7-1749-413D-A5E2-ABE6753B3766@proper.com> <52BA1065.6000403@delphij.net> <52BA2125.8050404@delphij.net> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 18:46:16 -0000 On Tue, 24 Dec 2013 16:04:53 -0800 Xin Li wrote: > When reading from /dev/random, one essentially consumes entropy that > is fed into the random device, and eventually it would cause a reseed. Reads don't trigger reseeds in Yarrow. And both Yarrow and Fortuna are designed so this isn't a problem. In any case reads that aren't under the control of an unprivileged attacker make it harder to perform a state-extension attack, not easier. This kind of thing shouldn't be an issue for any non-blocking random device that isn't quite badly broken. If it were, it would be better to fix the device. From owner-freebsd-security@FreeBSD.ORG Wed Dec 25 21:23:49 2013 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 74D79B6F; Wed, 25 Dec 2013 21:23:49 +0000 (UTC) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 37DC1143A; Wed, 25 Dec 2013 21:23:48 +0000 (UTC) Received: from localhost (user-94-254-144-148.play-internet.pl [94.254.144.148]) by mail.dawidek.net (Postfix) with ESMTPSA id 7F31939D; Wed, 25 Dec 2013 22:16:52 +0100 (CET) Date: Wed, 25 Dec 2013 22:24:27 +0100 From: Pawel Jakub Dawidek To: d@delphij.net Subject: Re: [PATCH RFC] Disable save-entropy in jails Message-ID: <20131225212338.GA2679@garage.freebsd.pl> References: <52B9F232.1090002@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <52B9F232.1090002@delphij.net> X-OS: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: "freebsd-security@freebsd.org" , FreeBSD Current X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 21:23:49 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 24, 2013 at 12:44:34PM -0800, Xin Li wrote: > Hi, >=20 > I think we shouldn't save entropy inside jails, as the data is not going > to be used by rc script (pjd@126744). If there is no objections, I will > commit this changeset on January 1, 2014. I agree we shouldn't do it. I have this line in my crontab that I wanted to commit at some point: 1,31 0-5 * * * root [ `sysctl -n security.jail.= jailed` -eq 0 ] && adjkerntz -a It prevents executing adjkerntz from within a jail, but allows to keep the same crontab in and outside jails. We could do the same for save-entropy. It would be even nicer to have some flag so that even sysctl(8) is not executed. > Index: libexec/save-entropy/save-entropy.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- libexec/save-entropy/save-entropy.sh (revision 259828) > +++ libexec/save-entropy/save-entropy.sh (working copy) > @@ -42,6 +42,10 @@ elif [ -r /etc/rc.conf ]; then > . /etc/rc.conf 2>/dev/null > fi >=20 > +if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then > + exit 0 > +fi > + > case ${entropy_dir} in > [Nn][Oo]) > exit 0 --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iEYEARECAAYFAlK7TNoACgkQForvXbEpPzTsSQCg7jQLc3nPkE//ysiqTbOtJBMw kQcAnjujd8rjiMJJu3ifsf2caNBfttIr =G2p5 -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw-- From owner-freebsd-security@FreeBSD.ORG Wed Dec 25 22:50:04 2013 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB61E325 for ; Wed, 25 Dec 2013 22:50:04 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8268619DC for ; Wed, 25 Dec 2013 22:50:04 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id bz8so12944952wib.4 for ; Wed, 25 Dec 2013 14:50:03 -0800 (PST) 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:mime-version :content-type:content-transfer-encoding; bh=KnirY9Pn267N8NQ2qdkYwhxRPTRiacijDdCutiy1J34=; b=mYiv/kaGTOYXt7H/3yPAnIHKQp8uyUYdxCDkmQXJG9WbaS5AEjU8ijaKP7lMbVhhEz 32B6U7ssSWZbOQz9pPAZgpuFR2DllR++YE2RbAJClzYcdxn2yGpQf0NDN5jXDPpKFdA8 F4j27rz1Xy1VsKdy8jeb7cMrnv5IxzVekzzAtJpealWTyTpEBKJa9hA14mXofNCOl7Gl a2QpQFbEFmW1aX+eI1d0DBYUSFfEJQ8oXgSFwYjetgXRPhPU7Kb0UAOYz/I+rXx3IACA f7fdNmavmDdx/XOcafj2hsUClKmk2nm+OdP6W6itJgpJvsxyJPjx4hqqnUfGaZ0AznUy BCPw== X-Received: by 10.194.240.197 with SMTP id wc5mr27923592wjc.23.1388011802901; Wed, 25 Dec 2013 14:50:02 -0800 (PST) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPSA id cx3sm46461438wib.0.2013.12.25.14.50.01 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 25 Dec 2013 14:50:02 -0800 (PST) Date: Wed, 25 Dec 2013 22:50:00 +0000 From: RW To: freebsd-security@freebsd.org Subject: Re: [PATCH RFC] Disable save-entropy in jails Message-ID: <20131225225000.0c9ad452@gumby.homeunix.com> In-Reply-To: <20131225212338.GA2679@garage.freebsd.pl> References: <52B9F232.1090002@delphij.net> <20131225212338.GA2679@garage.freebsd.pl> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 22:50:05 -0000 On Wed, 25 Dec 2013 22:24:27 +0100 Pawel Jakub Dawidek wrote: > We could do the same for save-entropy. It would be even nicer to have > some flag so that even sysctl(8) is not executed. The only security consideration here is that a bug in that conditional test might prevent entropy being saved. The benefit is saving a few KBs of disk space and a few cpu cycles a few times an hour. Tiny risk, even tinier benefit IMO. From owner-freebsd-security@FreeBSD.ORG Thu Dec 26 15:21:05 2013 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 B1A81EBC; Thu, 26 Dec 2013 15:21:05 +0000 (UTC) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 756FB18A2; Thu, 26 Dec 2013 15:21:05 +0000 (UTC) Received: from 41-132-74-122.dsl.mweb.co.za ([41.132.74.122] helo=[192.168.0.6]) by gromit.grondar.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VwCk9-000Jh6-5E; Thu, 26 Dec 2013 15:21:02 +0000 Subject: Re: [PATCH RFC] Disable save-entropy in jails Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: multipart/signed; boundary="Apple-Mail=_2E445BD2-D202-4E8E-9E15-DAF30A9708B3"; protocol="application/pgp-signature"; micalg=pgp-sha512 From: Mark Robert Vaughan Murray In-Reply-To: <20131225225000.0c9ad452@gumby.homeunix.com> Date: Thu, 26 Dec 2013 17:20:46 +0200 Message-Id: <5AFFCAA2-6F1F-4E3C-8311-4993B79C87EF@FreeBSD.org> References: <52B9F232.1090002@delphij.net> <20131225212338.GA2679@garage.freebsd.pl> <20131225225000.0c9ad452@gumby.homeunix.com> To: RW X-Mailer: Apple Mail (2.1827) X-SA-Score: -1.0 Cc: freebsd-security@freebsd.org X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 15:21:05 -0000 --Apple-Mail=_2E445BD2-D202-4E8E-9E15-DAF30A9708B3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 26 Dec 2013, at 00:50, RW wrote: > On Wed, 25 Dec 2013 22:24:27 +0100 > Pawel Jakub Dawidek wrote: >=20 >=20 >> We could do the same for save-entropy. It would be even nicer to have >> some flag so that even sysctl(8) is not executed. >=20 > The only security consideration here is that a bug in that conditional > test might prevent entropy being saved. The benefit is saving a few = KBs > of disk space and a few cpu cycles a few times an hour. Tiny risk, = even > tinier benefit IMO. Yes. It would be more work but nicer if these scripts could be somehow = marked =93not for jail use=94 and then dealt with by the boot process. Hmm. It looks like rcorder(8) may already know about a =91nojail=92 = attribute. I think using that would be best. M=20 --=20 Mark R V Murray --Apple-Mail=_2E445BD2-D202-4E8E-9E15-DAF30A9708B3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - http://gpgtools.org iQCVAwUBUrxJVN58vKOKE6LNAQoiOAQArqG/mxL3u3/uCgNYcLSz/hHnA13rzXWZ mDa05WaUowIloGLAmkZyc3YcEuJ6XNUZQhY2cCIDmdOKv8V7pJaRYkwNe7IuJbdV 30YREyo1aVVX+cGJNrnCgnWpVBatlgCInjbTjB7bjKdQGcOtvk9gbpa000cCnxa5 WhRqTevQ70s= =kM3a -----END PGP SIGNATURE----- --Apple-Mail=_2E445BD2-D202-4E8E-9E15-DAF30A9708B3--