From: "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "M. Mohan Kumar" <mohan@in.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [V8 PATCH 11/11] virtio-9p: Chroot environment for other functions
Date: Thu, 10 Mar 2011 21:54:18 -0800 [thread overview]
Message-ID: <4D79B90A.2020204@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTina-SNs6AKC_y6H=6qWiyX9=ruREJw3L3Z4bYp6@mail.gmail.com>
On 3/10/2011 4:29 AM, Stefan Hajnoczi wrote:
> On Wed, Mar 9, 2011 at 5:16 PM, M. Mohan Kumar <mohan@in.ibm.com> wrote:
>> Add chroot functionality for systemcalls that can operate on a file
>> using relative directory file descriptor.
>
> I suspect the relative directory approach is broken and escapes the
> chroot. Here's why:
>
> The request is local_chmod(fs_ctx, "/..", credp). dirname("/..") is
> "/" and basename("..") is "..".
We should never receive protocol operations with relative path.
Client should always resolve to full path and send the request.
If the client is malicious this scenario can be be possible.. but in that case
it is fine to fail the operation.
Thanks,
JV
> I'm not 100% sure of the semantics but I suspect that chmodat(dir_fd,
> "..", ...) does not honor the chroot since your current task is not
> inside the chroot. If so, then you can manipulate the parent
> directory of the chroot using some of the operations added in this
> patch.
>
> The safe solution is to perform all operations inside the chroot.
> This will require extending the chroot socket protocol.
>
> Stefan
>
next prev parent reply other threads:[~2011-03-11 5:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-09 17:15 [Qemu-devel] [V8 PATCH 00/11] virtio-9p: Use chroot to safely access files in passthrough security model M. Mohan Kumar
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 01/11] Implement qemu_read_full M. Mohan Kumar
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 02/11] virtio-9p: Enable CONFIG_THREAD if CONFIG_VIRTFS is enabled M. Mohan Kumar
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 03/11] virtio-9p: Provide chroot worker side interfaces M. Mohan Kumar
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 04/11] virtio-9p: Add qemu side interfaces for chroot environment M. Mohan Kumar
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 05/11] virtio-9p: Add support to open a file in " M. Mohan Kumar
2011-03-10 11:09 ` [Qemu-devel] " Stefan Hajnoczi
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 06/11] virtio-9p: Create support " M. Mohan Kumar
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 07/11] virtio-9p: Support for creating special files M. Mohan Kumar
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 08/11] virtio-9p: Add support for removing file or directory M. Mohan Kumar
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 09/11] virtio-9p: Add support to rename M. Mohan Kumar
2011-03-09 17:15 ` [Qemu-devel] [V8 PATCH 10/11] virtio-9p: Move file post creation changes to none security model M. Mohan Kumar
2011-03-09 17:16 ` [Qemu-devel] [V8 PATCH 11/11] virtio-9p: Chroot environment for other functions M. Mohan Kumar
2011-03-10 12:29 ` [Qemu-devel] " Stefan Hajnoczi
2011-03-11 5:54 ` Venkateswararao Jujjuri (JV) [this message]
2011-03-11 6:30 ` Stefan Hajnoczi
2011-03-11 15:23 ` Venkateswararao Jujjuri (JV)
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=4D79B90A.2020204@linux.vnet.ibm.com \
--to=jvrao@linux.vnet.ibm.com \
--cc=mohan@in.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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).