public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: James Morris <jmorris@namei.org>
Cc: linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Neil Brown <neilb@suse.de>, Dave Quigley <dpquigl@tycho.nsa.gov>,
	"Serge E. Hallyn" <serue@us.ibm.com>
Subject: Re: [PATCH 5/5] NFSv3: Add server namespace support for XATTR protocol implementation
Date: Fri, 26 Feb 2010 08:46:30 -0500	[thread overview]
Message-ID: <1267191990.7691.37.camel@moss-pluto.epoch.ncsc.mil> (raw)
In-Reply-To: <alpine.LRH.2.00.1002261537020.25193@tundra.namei.org>

On Fri, 2010-02-26 at 15:37 +1100, James Morris wrote:
> Add support for a server namespace for storing and retrieving
> client-supplied xattrs.  All xattrs are now stored on the server under
> the user._nfsd namespace, and are not interpreted by the server at all.
> This allows clients to utilize arbitrary xattr namespaces and for the
> server to act only as a storage mechanism for the xattrs.
> 
> The user._nfsd namespace was chosen because filesystems generally have
> a user. xattr handler implemented.  Using something like system. would
> require implementing a generalized handler for each backing fs on the
> server, as well as requiring privilege to access.

I'm wondering whether the user. namespace is best for storage on the
server given that:
- the user. namespace is restricted to regular files or directories (see
xattr_permission()), and
- the user. namespace applies its own set of permission checking logic
that we don't necessarily want applied in the case of trusted. or
security. attributes (e.g. special rules on sticky directories and read
or write access to the file, see xattr_permission()), and
- storing the attributes in the user. namespace would allow local users
on the server to manipulate them directly.  I know that you stated an
assumption that end users do not have local access to the exported
filesystem, but it would be better if the system itself would restrict
the ability to set these attributes to privileged processes on the
server.

Using the security. or trusted. namespace would avoid the restriction on
file type and require CAP_SYS_ADMIN on setxattr.  That would prevent
local modification by non-admins and should have no effect on clients
(since nfsd doesn't drop CAP_SYS_ADMIN).

> Currently, only the user and trusted namespaces are supported by
> the client, as system and security namespaces require further analysis,
> and some special-case handling will be required (for security.selinux,
> at least).
> 
> NFS ACLs continue to work as expected, because they implement a
> hard-coded system xattr namespace which is invoked before the
> NFS layer.  e.g. any access to a system.posix_acl_access xattr
> is invokes the NFS_ACL protocol.

-- 
Stephen Smalley
National Security Agency


  reply	other threads:[~2010-02-26 14:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26  4:33 [PATCH 0/5][v3][RFC] NFSv3: implement extended attribute protocol (XATTR) James Morris
2010-02-26  4:34 ` [PATCH 1/5] NFSv3: convert client to generic xattr API James Morris
2010-02-26  4:35 ` [PATCH 2/5] NFSv3: add xattr API config option for client James Morris
     [not found] ` <alpine.LRH.2.00.1002261457420.25193-CK9fWmtY32x9JUWOpEiw7w@public.gmane.org>
2010-02-26  4:36   ` Subject: [PATCH 3/5] NFSv3: add client implementation of XATTR protocol James Morris
2010-02-26  4:36 ` [PATCH 4/5] NFSv3: add server " James Morris
2010-02-26  4:37 ` [PATCH 5/5] NFSv3: Add server namespace support for XATTR protocol implementation James Morris
2010-02-26 13:46   ` Stephen Smalley [this message]
2010-03-01  0:49     ` Casey Schaufler
2010-03-01  1:17       ` Trond Myklebust
2010-03-01  8:09         ` James Morris
2010-03-08 10:42 ` [PATCH 0/6][v4][RFC] NFSv3: implement extended attribute protocol (XATTR) James Morris
2010-03-08 10:43   ` [PATCH 1/6] NFSv3: convert client to generic xattr API James Morris
2010-03-08 10:44   ` [PATCH 3/6] NFSv3: add client implementation of XATTR protocol James Morris
2010-03-08 10:45   ` [PATCH 4/6] NFSv3: add server " James Morris
2010-03-08 10:46   ` [PATCH 5/6] xattr: add new top level nfsd namespace and implement ext3 support James Morris
     [not found]   ` <alpine.LRH.2.00.1003082122340.6314-CK9fWmtY32x9JUWOpEiw7w@public.gmane.org>
2010-03-08 10:43     ` [PATCH 2/6] NFSv3: add xattr API config option for client James Morris
2010-03-08 10:47     ` [PATCH 6/6] NFSv3: Add server namespace support for XATTR protocol implementation James Morris
2010-03-09  3:59   ` [PATCH 0/6][v4][RFC] NFSv3: implement extended attribute protocol (XATTR) Brad Boyer
2010-03-09  5:49     ` Casey Schaufler
2010-03-09  7:04       ` Brad Boyer
2010-03-09 19:35         ` Jamie Lokier
2010-03-10  3:46           ` Casey Schaufler
2010-03-15  3:19             ` Jamie Lokier
2010-03-15  4:42               ` Casey Schaufler
2010-03-15 14:28                 ` Jamie Lokier
2010-03-15 23:28                   ` Casey Schaufler
2010-03-15 23:49                     ` Trond Myklebust
2010-03-16  2:31                       ` Casey Schaufler
2010-03-17 20:13       ` Eric Paris
2010-03-17 21:23         ` Casey Schaufler
2010-03-09  8:13     ` James Morris
2010-03-13  7:28       ` Brad Boyer

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=1267191990.7691.37.camel@moss-pluto.epoch.ncsc.mil \
    --to=sds@tycho.nsa.gov \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=dpquigl@tycho.nsa.gov \
    --cc=jmorris@namei.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=serue@us.ibm.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