The patch titled file capabilities: don't do file caps if MNT_NOSUID has been added to the -mm tree. Its filename is file-capabilities-dont-do-file-caps-if-mnt_nosuid.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: file capabilities: don't do file caps if MNT_NOSUID From: Serge E. Hallyn <serue@xxxxxxxxxx> A file system mounted NOSUID is likely a removable filesystem. Allowing file capabilities from such an fs is an easy attack vector, so don't honor file capabilities for a NOSUID filesystem. Signed-off-by: Serge E. Hallyn <serue@xxxxxxxxxx> Cc: Stephen Smalley <sds@xxxxxxxxxxxxx> Cc: James Morris <jmorris@xxxxxxxxx> Cc: Chris Wright <chrisw@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- security/commoncap.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN security/commoncap.c~file-capabilities-dont-do-file-caps-if-mnt_nosuid security/commoncap.c --- a/security/commoncap.c~file-capabilities-dont-do-file-caps-if-mnt_nosuid +++ a/security/commoncap.c @@ -23,6 +23,7 @@ #include <linux/ptrace.h> #include <linux/xattr.h> #include <linux/hugetlb.h> +#include <linux/mount.h> int cap_netlink_send(struct sock *sk, struct sk_buff *skb) { @@ -152,6 +153,9 @@ static int set_file_caps(struct linux_bi struct inode *inode; int err; + if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID) + return 0; + dentry = dget(bprm->file->f_dentry); inode = dentry->d_inode; if (!inode->i_op || !inode->i_op->getxattr) { _ Patches currently in -mm which might be from serue@xxxxxxxxxx are implement-file-posix-capabilities.patch file-capabilities-dont-do-file-caps-if-mnt_nosuid.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html