From owner-freebsd-security@FreeBSD.ORG Tue Jun 11 19:31:55 2013 Return-Path: Delivered-To: freebsd-security@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C067EF26; Tue, 11 Jun 2013 19:31:55 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 8CA6A1832; Tue, 11 Jun 2013 19:31:55 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id BE9DA4B3; Tue, 11 Jun 2013 21:27:25 +0200 (CEST) Date: Tue, 11 Jun 2013 21:31:59 +0200 From: Pawel Jakub Dawidek To: Brooks Davis Subject: Re: Request for review: Sandboxing dhclient using Capsicum. Message-ID: <20130611193158.GA1387@garage.freebsd.pl> References: <20130608223346.GA2468@garage.freebsd.pl> <20130610230717.GF73639@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline In-Reply-To: <20130610230717.GF73639@lor.one-eyed-alien.net> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-security@FreeBSD.org X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2013 19:31:55 -0000 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 10, 2013 at 06:07:17PM -0500, Brooks Davis wrote: > On Sun, Jun 09, 2013 at 12:33:46AM +0200, Pawel Jakub Dawidek wrote: > > I'd appreciate any review, especially security audit of the proposed > > changes. The new and most critical function is probably send_packet_pri= v(). >=20 > I've looked over the diff and not found any significant issues, but have > a few comments in order of most to least important. >=20 > In change 229477 using a cached hostname may change behavior if the host > is renamed as a result of dhclient operation. The new behavior might be > more correct, at least it would be if we reliably restored the host name > on termination. I think the change is fine, but we should be keep an > eye out for problem reports. Yes, I'm aware of that possibility, I just don't think this is a big deal. The hostname could be changed right after sending discover/request and it will take a long while before the new one is send. > In change 229476 I noticed there is a constant 0x1fff that you've moved > around. It was already there, but it seems like an unnecessary magic > number. I agree, but I was trying to avoid changes not strictly related to sandboxing. It was very hard to resist, belive me. For example I started removing 'ifi' global variable, which I really don't like, but decided to leave it for now (later I only changed variable name in disassoc() that shadowed this global variable). > In the send_packet_* function declarations in dhcpd.h, you have included > variable names which is inconsistent with the surrounding definitions. Fixed. Thanks for the review! --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlG3ey4ACgkQForvXbEpPzTfEwCg3rlUA3Z3vFYYQR4QV/zO4N4x rPsAnj4IhgEpEcACkBCGuJ+P8LCt5CVU =RGeE -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--