All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] fs: fix capable() call in simple_xattr_list()
@ 2022-09-01 15:26 Ondrej Mosnacek
  2022-09-01 15:26 ` [PATCH 1/2] fs: convert simple_xattrs to RCU list Ondrej Mosnacek
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Ondrej Mosnacek @ 2022-09-01 15:26 UTC (permalink / raw)
  To: Alexander Viro
  Cc: linux-fsdevel, linux-security-module, selinux, rcu, linux-kernel,
	Martin Pitt

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

-- 
2.37.2


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

end of thread, other threads:[~2022-11-03 10:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 15:26 [PATCH 0/2] fs: fix capable() call in simple_xattr_list() Ondrej Mosnacek
2022-09-01 15:26 ` [PATCH 1/2] fs: convert simple_xattrs to RCU list Ondrej Mosnacek
2022-09-01 15:26 ` [PATCH 2/2] fs: don't call capable() prematurely in simple_xattr_list() Ondrej Mosnacek
2022-09-05  9:08 ` [PATCH 0/2] fs: fix capable() call " Christian Brauner
2022-09-05 10:15   ` Ondrej Mosnacek
2022-09-05 15:30     ` Christian Brauner
2022-11-02 18:24       ` Christian Brauner
2022-11-03  1:59         ` Serge E. Hallyn
2022-11-03  9:04         ` Ondrej Mosnacek
2022-11-03  9:12           ` Christian Brauner
2022-11-03 10:51             ` Ondrej Mosnacek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.