[RFC][PATCH 0/2] Correct behavior for listxattr and 'trusted' xattrs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux