From: Song Liu <songliubraving@meta.com>
To: Christian Brauner <brauner@kernel.org>
Cc: Paul Moore <paul@paul-moore.com>,
Al Viro <viro@zeniv.linux.org.uk>, Song Liu <song@kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-security-module@vger.kernel.org"
<linux-security-module@vger.kernel.org>,
"apparmor@lists.ubuntu.com" <apparmor@lists.ubuntu.com>,
"selinux@vger.kernel.org" <selinux@vger.kernel.org>,
"tomoyo-users_en@lists.sourceforge.net"
<tomoyo-users_en@lists.sourceforge.net>,
"tomoyo-users_ja@lists.sourceforge.net"
<tomoyo-users_ja@lists.sourceforge.net>,
Kernel Team <kernel-team@meta.com>,
"andrii@kernel.org" <andrii@kernel.org>,
"eddyz87@gmail.com" <eddyz87@gmail.com>,
"ast@kernel.org" <ast@kernel.org>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
"martin.lau@linux.dev" <martin.lau@linux.dev>,
"jack@suse.cz" <jack@suse.cz>,
"kpsingh@kernel.org" <kpsingh@kernel.org>,
"mattbobrowski@google.com" <mattbobrowski@google.com>,
"amir73il@gmail.com" <amir73il@gmail.com>,
"repnop@google.com" <repnop@google.com>,
"jlayton@kernel.org" <jlayton@kernel.org>,
"josef@toxicpanda.com" <josef@toxicpanda.com>,
"mic@digikod.net" <mic@digikod.net>,
"gnoack@google.com" <gnoack@google.com>,
"m@maowtm.org" <m@maowtm.org>,
"john.johansen@canonical.com" <john.johansen@canonical.com>,
"john@apparmor.net" <john@apparmor.net>,
"stephen.smalley.work@gmail.com" <stephen.smalley.work@gmail.com>,
"omosnace@redhat.com" <omosnace@redhat.com>,
"takedakn@nttdata.co.jp" <takedakn@nttdata.co.jp>,
"penguin-kernel@i-love.sakura.ne.jp"
<penguin-kernel@i-love.sakura.ne.jp>,
"enlightened@chromium.org" <enlightened@chromium.org>
Subject: Re: [RFC] vfs: security: Parse dev_name before calling security_sb_mount
Date: Thu, 10 Jul 2025 17:00:18 +0000 [thread overview]
Message-ID: <5EB3EFBC-69BA-49CC-B416-D4A7398A2B47@meta.com> (raw)
In-Reply-To: <20250710-roden-hosen-ba7f215706bb@brauner>
> On Jul 10, 2025, at 4:46 AM, Christian Brauner <brauner@kernel.org> wrote:
[...]
>> Right now, we have security_sb_mount and security_move_mount, for
>> syscall “mount” and “move_mount” respectively. This is confusing
>> because we can also do move mount with syscall “mount”. How about
>> we create 5 different security hooks:
>>
>> security_bind_mount
>> security_new_mount
>> security_reconfigure_mount
>> security_remount
>> security_change_type_mount
>>
>> and remove security_sb_mount. After this, we will have 6 hooks for
>> each type of mount (the 5 above plus security_move_mount).
>
> I've multiple times pointed out that the current mount security hooks
> aren't working and basically everything in the new mount api is
> unsupervised from an LSM perspective.
To make sure I understand the comment. By “new mount api”, do you mean
the code path under do_new_mount()?
> My recommendation is make a list of all the currently supported
> security_*() hooks in the mount code (I certainly don't have them in my
> head). Figure out what each of them allow to mediate effectively and how
> the callchains are related.
>
> Then make a proposal how to replace them with something that a) doesn't
> cause regressions which is probably something that the LSMs care about
> and b) that covers the new mount API sufficiently to be properly
> mediated.
>
> I'll happily review proposals. Fwiw, I'm pretty sure that this is
> something that Mickael is interested in as well.
So we will consider a proper redesign of LSM hooks for mount syscalls,
but we do not want incremental improvements like this one. Do I get
the direction right?
Thanks,
Song
next prev parent reply other threads:[~2025-07-10 17:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 23:05 Song Liu
2025-07-09 10:24 ` Al Viro
2025-07-09 15:19 ` Paul Moore
2025-07-09 17:06 ` Song Liu
2025-07-10 11:46 ` Christian Brauner
2025-07-10 17:00 ` Song Liu [this message]
2025-07-11 9:36 ` Christian Brauner
2025-07-11 16:22 ` Song Liu
2025-07-14 8:45 ` Christian Brauner
2025-07-14 15:10 ` Song Liu
2025-07-15 10:18 ` Christian Brauner
2025-07-15 22:31 ` Song Liu
2025-07-16 8:31 ` Christian Brauner
2025-07-16 17:12 ` Song Liu
2025-07-11 23:09 ` Song Liu
2025-07-10 21:40 ` Paul Moore
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=5EB3EFBC-69BA-49CC-B416-D4A7398A2B47@meta.com \
--to=songliubraving@meta.com \
--cc=amir73il@gmail.com \
--cc=andrii@kernel.org \
--cc=apparmor@lists.ubuntu.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=enlightened@chromium.org \
--cc=gnoack@google.com \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=john.johansen@canonical.com \
--cc=john@apparmor.net \
--cc=josef@toxicpanda.com \
--cc=kernel-team@meta.com \
--cc=kpsingh@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=m@maowtm.org \
--cc=martin.lau@linux.dev \
--cc=mattbobrowski@google.com \
--cc=mic@digikod.net \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=repnop@google.com \
--cc=selinux@vger.kernel.org \
--cc=song@kernel.org \
--cc=stephen.smalley.work@gmail.com \
--cc=takedakn@nttdata.co.jp \
--cc=tomoyo-users_en@lists.sourceforge.net \
--cc=tomoyo-users_ja@lists.sourceforge.net \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®