qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Cc: mohan@in.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH] virtio-9p: Use clone approach to fix TOCTOU vulnerability
Date: Thu, 16 Jun 2011 06:16:46 +0100	[thread overview]
Message-ID: <BANLkTi=HzrLO1NgZ0DNdGQZRxrRxLCy64A@mail.gmail.com> (raw)
In-Reply-To: <4DF8F706.4080709@linux.vnet.ibm.com>

On Wed, Jun 15, 2011 at 7:16 PM, Venkateswararao Jujjuri
<jvrao@linux.vnet.ibm.com> wrote:
> On 06/15/2011 10:35 AM, Stefan Hajnoczi wrote:
>>
>> On Tue, Jun 14, 2011 at 9:12 AM, M. Mohan Kumar<mohan@in.ibm.com>  wrote:
>>>
>>> [RFC PATCH] virtio-9p: Use clone approach to fix TOCTOU vulnerability
>>>
>>> In passthrough security model, following a symbolic link in the server
>>> 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.
>>
>> How will chroot(2) work when QEMU runs as non-root (i.e. secure
>> production environments)?
>>
> This is used only in passthrough mode; passthrough mode needs root access by
> design.
> There is no TOCTTOU vulnerability in mapped mode as symlinks are not actual
> symlinks on host FS.

So is passthrough mode something you only expect developers and
one-off command-line users to try?  I expect users would not want to
run QEMU as root in production.

Regarding mapped mode, I think jailing problems still exist there
since the guest could send a path that contains "../../../../.." and
escape the fs_root?

Stefan

  reply	other threads:[~2011-06-16  5:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14  8:12 [Qemu-devel] [RFC PATCH] virtio-9p: Use clone approach to fix TOCTOU vulnerability M. Mohan Kumar
2011-06-15 15:24 ` Stefan Hajnoczi
2011-06-16 11:28   ` M. Mohan Kumar
2011-06-15 17:35 ` Stefan Hajnoczi
2011-06-15 18:16   ` Venkateswararao Jujjuri
2011-06-16  5:16     ` Stefan Hajnoczi [this message]
2011-06-15 20:10 ` Andreas Färber
2011-06-16 11:20   ` M. Mohan Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=HzrLO1NgZ0DNdGQZRxrRxLCy64A@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=jvrao@linux.vnet.ibm.com \
    --cc=mohan@in.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).