From: Christian Brauner <brauner@kernel.org>
To: Ondrej Mosnacek <omosnace@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org,
linux-security-module@vger.kernel.org, selinux@vger.kernel.org,
rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
Martin Pitt <mpitt@redhat.com>, Vasily Averin <vvs@openvz.org>
Subject: Re: [PATCH 0/2] fs: fix capable() call in simple_xattr_list()
Date: Mon, 5 Sep 2022 11:08:11 +0200 [thread overview]
Message-ID: <20220905090811.ocnnc53y2bow7m3i@wittgenstein> (raw)
In-Reply-To: <20220901152632.970018-1-omosnace@redhat.com>
On Thu, Sep 01, 2022 at 05:26:30PM +0200, Ondrej Mosnacek wrote:
> 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).
Hey Ondrey,
There's another patchset I'd like to see first which switches from a
linked list to an rbtree to get rid of performance issues in this code
that can be used to dos tmpfs in containers:
https://lore.kernel.org/lkml/d73bd478-e373-f759-2acb-2777f6bba06f@openvz.org
I don't think Vasily has time to continue with this so I'll just pick it
up hopefully this or the week after LPC.
Christian
next prev parent reply other threads:[~2022-09-05 9:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Christian Brauner [this message]
2022-09-05 10:15 ` [PATCH 0/2] fs: fix capable() call " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220905090811.ocnnc53y2bow7m3i@wittgenstein \
--to=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mpitt@redhat.com \
--cc=omosnace@redhat.com \
--cc=rcu@vger.kernel.org \
--cc=selinux@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=vvs@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).