All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: v9fs-developer@lists.sourceforge.net, aliguori@us.ibm.com,
	Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH-V5 0/10] virtio-9p:Introducing security model for VirtFS
Date: Fri,  4 Jun 2010 18:08:42 -0700	[thread overview]
Message-ID: <1275700132-22823-1-git-send-email-jvrao@linux.vnet.ibm.com> (raw)

This patch series introduces the security model for VirtFS.

Brief description of this patch series:

It introduces two type of security models for VirtFS.
They are: mapped and passthrough.

The following is common to both security models.

* Client's VFS determines/enforces the access control.
  Largely server should never return EACCESS.

* Client sends gid/mode-bit information as part of creation only.

Changes from V4
---------------
o Most of the cosmetic changes proposed by Aneesh.
o Divided into more number of patches and added more explanation to each patch.

Changes from V3
---------------
o Return NULL instead of exit(1) on failure in virtio_9p_init()
o Capitalized sm_passthrough, sm_mappe
o Added handling for EINTR for read/write.
o Corrected default permissions for mkdir in mapped mode.
o Added additional error handling.

Changes from V2
---------------
o Removed warnings resulting from chmod/chown.
o Added code to fail normally if secuirty_model option is not specified.

Changes from V1
---------------
o Added support for chmod and chown.
o Used chmod/chown to set credentials instead of setuid/setgid.
o Fixed a bug where uid used instated of uid.


Security model: mapped
----------------------

VirtFS server(QEMU) intercepts and maps all the file object create requests.
Files on the fileserver will be created with QEMU's user credentials and the
client-user's credentials are stored in extended attributes.
During getattr() server extracts the client-user's credentials from extended
attributes and sends to the client.

Given that only the user space extended attributes are available to regular
files, special files are created as regular files on the fileserver and the
appropriate mode bits are stored in xattrs and will be extracted during
getattr.

If the extended attributes are missing, server sends back the filesystem
stat() unaltered. This provision will make the files created on the
fileserver usable to client.

Points to be considered

* Filesystem will be VirtFS'ized. Meaning, other filesystems may not
 understand the credentials of the files created under this model.

* Regular utilities like 'df' may not report required results in this model.
 Need for special reporting utilities which can understand this security model.


Security model : passthrough
----------------------------

In this security model, VirtFS server passes down all requests to the
underlying filesystem. File system objects on the fileserver will be created
with client-user's credentials. This is done by setting setuid()/setgid()
during creation or ch* after file creation. At the end of create protocol
request, files on the fileserver will be owned by cleint-user's uid/gid.

Points to be considered

  * Fileserver should always run as 'root'.
  * Root squashing may be needed. Will be for future work.
  * Potential for user credential clash between guest's user space IDs and
    host's user space IDs.

It also adds security model attribute to -fsdev device and to -virtfs shortcut.

Usage examples:
-fsdev local,id=jvrao,path=/tmp/,security_model=mapped
-virtfs local,path=/tmp/,security_model=passthrough,mnt_tag=v_tmp.

--
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>

             reply	other threads:[~2010-06-05  1:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-05  1:08 Venkateswararao Jujjuri (JV) [this message]
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 01/10] virtio-9p: Introduces an option to specify the security model Venkateswararao Jujjuri (JV)
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 02/10] virtio-9p: Make infrastructure for the new " Venkateswararao Jujjuri (JV)
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 03/10] virtio-9p: Security model for chmod Venkateswararao Jujjuri (JV)
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 04/10] virtio-9p: Security model for chown Venkateswararao Jujjuri (JV)
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 05/10] virtio-9p: Implemented Security model for lstat and fstat Venkateswararao Jujjuri (JV)
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 06/10] virtio-9p: Security model for create/open2 Venkateswararao Jujjuri (JV)
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 07/10] virtio-9p: Security model for mkdir Venkateswararao Jujjuri (JV)
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 08/10] virtio-9p: Security model for symlink and readlink Venkateswararao Jujjuri (JV)
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 09/10] virtio-9p: Implement Security model for mknod Venkateswararao Jujjuri (JV)
2010-06-05  1:08 ` [Qemu-devel] [PATCH-V5 10/10] virtio-9p: Implement Security model for mksock using mknod Venkateswararao Jujjuri (JV)
2010-06-05  7:45 ` [Qemu-devel] [PATCH-V5 0/10] virtio-9p:Introducing security model for VirtFS Blue Swirl
2010-06-05 22:50   ` Venkateswararao Jujjuri (JV)
2010-06-06  7:12     ` Blue Swirl

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=1275700132-22823-1-git-send-email-jvrao@linux.vnet.ibm.com \
    --to=jvrao@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.