Skip to content

fs: fix capable() call in simple_xattr_list()

Ondrej Mosnacek linux-fsdevel linux-security-module lkml rcu selinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fs: convert simple_xattrs to RCU listfs/xattr.c include/linux/xattr.h+23 -140 replies
2/2fs: don't call capable() prematurely in simple_xattr_list()fs/xattr.c+1 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] fs: fix capable() call in simple_xattr_list()

The goal of these patches is to avoid calling capable() unconditionally in simple_xattr_list(), which causes issues under SELinux (see explanation in the second patch).

The first patch tries to make this change safer by converting simple_xattrs to use the RCU mechanism, so that capable() is not called while the xattrs->lock is held. I didn't find evidence that this is an issue in the current code, but it can't hurt to make that change either way (and it was quite straightforward).

Ondrej Mosnacek (2):
fs: convert simple_xattrs to RCU list
fs: don't call capable() prematurely in simple_xattr_list()

 fs/xattr.c            | 39 +++++++++++++++++++++++----------------
 include/linux/xattr.h |  1 +
 2 files changed, 24 insertions(+), 16 deletions(-)
Signature · 1 line
2.37.2