From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXCWD-0002Gy-Ng for qemu-devel@nongnu.org; Thu, 16 Jun 2011 09:21:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXCW7-0002ig-HY for qemu-devel@nongnu.org; Thu, 16 Jun 2011 09:21:56 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:39646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXCW5-0002hm-OF for qemu-devel@nongnu.org; Thu, 16 Jun 2011 09:21:50 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp05.au.ibm.com (8.14.4/8.13.1) with ESMTP id p5GBMdNf003834 for ; Thu, 16 Jun 2011 21:22:39 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p5GBRnXe1470670 for ; Thu, 16 Jun 2011 21:27:49 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p5GBSo75005533 for ; Thu, 16 Jun 2011 21:28:50 +1000 Date: Thu, 16 Jun 2011 16:58:44 +0530 From: "M. Mohan Kumar" Message-ID: <20110616112844.GD3428@in.ibm.com> References: <20110614081244.GB3428@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH] virtio-9p: Use clone approach to fix TOCTOU vulnerability Reply-To: mohan@in.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: jvrao@linux.vnet.ibm.com, qemu-devel@nongnu.org On Wed, Jun 15, 2011 at 04:24:12PM +0100, Stefan Hajnoczi wrote: > On Tue, Jun 14, 2011 at 9:12 AM, M. Mohan Kumar wrot= e: > > [RFC PATCH] virtio-9p: Use clone approach to fix TOCTOU vulnerability > > > > In passthrough security model, following a symbolic link in the serve= r > > side could result in TOCTTOU vulnerability. > > > > Use clone system call to create a thread which runs in chrooted > > environment. All passthrough model file operations are done from this > > thread to avoid TOCTTOU vulnerability. > > > > Signed-off-by: Venkateswararao Jujjuri > > Signed-off-by: M. Mohan Kumar > > --- > > =A0fsdev/file-op-9p.h =A0 =A0 =A0 =A0 | =A0 =A01 + > > =A0hw/9pfs/virtio-9p-coth.c =A0 | =A0105 ++++++++++++++++++++++++++++= +++++++++++++-- > > =A0hw/9pfs/virtio-9p-coth.h =A0 | =A0 13 +++++- > > =A0hw/9pfs/virtio-9p-device.c | =A0 =A07 +++- > > =A0hw/9pfs/virtio-9p.h =A0 =A0 =A0 =A0| =A0 =A06 ++- > > =A05 files changed, 124 insertions(+), 8 deletions(-) >=20 > This patch isn't against upstream virtio-9p. Please post a link to a > repo or more information. Hi Stefan, Thanks for the detailed review. I will address review comments in next version.