Skip to content

Commit 07d7a4d

Browse files
committed
Merge tag 'fs.xattr.simple.noaudit.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping
Pull xattr audit fix from Seth Forshee: "This is a single patch to remove auditing of the capability check in simple_xattr_list(). This check is done to check whether trusted xattrs should be included by listxattr(2). SELinux will normally log a denial when capable() is called and the task's SELinux context doesn't have the corresponding capability permission allowed, which can end up spamming the log. Since a failed check here cannot be used to infer malicious intent, auditing is of no real value, and it makes sense to stop auditing the capability check" * tag 'fs.xattr.simple.noaudit.v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: fs: don't audit the capability check in simple_xattr_list()
2 parents 6e8948a + e7eda15 commit 07d7a4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xattr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ static int xattr_list_one(char **buffer, ssize_t *remaining_size,
11581158
ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
11591159
char *buffer, size_t size)
11601160
{
1161-
bool trusted = capable(CAP_SYS_ADMIN);
1161+
bool trusted = ns_capable_noaudit(&init_user_ns, CAP_SYS_ADMIN);
11621162
struct simple_xattr *xattr;
11631163
ssize_t remaining_size = size;
11641164
int err = 0;

0 commit comments

Comments
 (0)