linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/2] Correct behavior for listxattr and 'trusted' xattrs
@ 2010-03-02  8:01 James Morris
  2010-03-02  8:01 ` [PATCH 1/2] jffs2: ensure trusted xattrs are not returned to unprivileged users via listxattr James Morris
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: James Morris @ 2010-03-02  8:01 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: linux-kernel, linux-security-module, David Woodhouse, Joel Becker,
	Mark Fasheh, Alex Elder, Chris Mason, a.gruenbacher

I noticed that there are differences in the behavior of listxattr(2) for 
xattrs in the trusted namespace.

Some filesystems, such as ext[234], require CAP_SYS_ADMIN for this, i.e. 
trusted xattr names are hidden from unprivileged users.

I audited the kernel for users of the trusted xattr namespace, and found 
the following filesystems not checking for CAP_SYS_ADMIN:

  - jffs2
  - ocfs2
  - btrfs
  - xfs

I've created patches for jffs2 (tested) and ocfs2 (not tested) to add the 
check -- see following emails. btrfs and xfs have custom listxattr 
operations and will need a bit more work to fix.

I'm not sure what the initial intention was for the behavior, although 
given that several major filesystems are have been fielded with the 
CAP_SYS_ADMIN check, it seems most prudent to make this the standard 
behavior for all filesystems, in case any users are depending on it.

Thoughts?


- James
-- 
James Morris
<jmorris@namei.org>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-03-10 14:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-02  8:01 [RFC][PATCH 0/2] Correct behavior for listxattr and 'trusted' xattrs James Morris
2010-03-02  8:01 ` [PATCH 1/2] jffs2: ensure trusted xattrs are not returned to unprivileged users via listxattr James Morris
2010-03-02  8:02 ` [PATCH 2/2] ocfs2: " James Morris
2010-03-02  9:29   ` Joel Becker
2010-03-02 22:01     ` James Morris
2010-03-02 23:15     ` Serge E. Hallyn
2010-03-02  8:28 ` [RFC][PATCH 0/2] Correct behavior for listxattr and 'trusted' xattrs Andreas Dilger
2010-03-03 13:02 ` Stephen Smalley
2010-03-10 11:48   ` Andreas Gruenbacher
2010-03-03 14:09 ` Christoph Hellwig
2010-03-10 11:26   ` Andreas Gruenbacher
2010-03-10 11:40 ` Christoph Hellwig
2010-03-10 14:04   ` James Morris

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).