From: Casey Schaufler <casey@schaufler-ca.com>
To: casey@schaufler-ca.com, paul@paul-moore.com,
linux-security-module@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, jmorris@namei.org,
serge@hallyn.com, keescook@chromium.org,
john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp,
stephen.smalley.work@gmail.com, selinux@vger.kernel.org
Subject: [PATCH 0/1] LSM: Mount option data management
Date: Tue, 24 Nov 2026 10:15:21 -0800 [thread overview]
Message-ID: <20261124181522.30415-1-casey@schaufler-ca.com> (raw)
In-Reply-To: <20261124181522.30415-1-casey.ref@schaufler-ca.com>
Mount option processing does not allow for multiple LSMs to process
options. It requires that the LSMs manage the data associated with their
options and assumes that one LSM will do all the work. A second LSM using
mount options clobbers the data of the first, resulting in mount failures.
In order for multiple LSMs to provide mount options the LSM management of
the data needs to change. A mount option blob replaces the LSM specific
data that is allocated. This still needs to be allocated within the
individual LSMs due to mount options being strictly optional. Duplication
and freeing, on the other hand, can be managed in the infrastructure.
SELinux provides a special challenge in that it defers mount option
handling in cases where the policy is not loaded. This requires that
additonal logic be added to detect if an allocated blob was created by
SELinux or by another LSM.
This is a substantial change from previous approaches to the problem,
which failed backward compatibility. Hence, it is not a verson 2.
https://github.com/cschaufler/lsm-stacking#mount-262221
Casey Schaufler (1):
LSM: infrastructure management of mount options
include/linux/lsm_hook_defs.h | 2 -
include/linux/lsm_hooks.h | 3 ++
security/lsm_init.c | 2 +
security/security.c | 29 ++++++++++-
security/selinux/hooks.c | 85 +++++++++++++++++-------------
security/selinux/include/objsec.h | 8 +++
security/smack/smack.h | 8 +++
security/smack/smack_lsm.c | 86 +++++++++++--------------------
8 files changed, 129 insertions(+), 94 deletions(-)
--
2.56.0
next parent reply other threads:[~2026-11-24 18:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261124181522.30415-1-casey.ref@schaufler-ca.com>
2026-11-24 18:15 ` Casey Schaufler [this message]
2026-11-24 18:15 ` [PATCH 1/1] LSM: infrastructure management of mount options Casey Schaufler
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=20261124181522.30415-1-casey@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=jmorris@namei.org \
--cc=john.johansen@canonical.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=selinux@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=stephen.smalley.work@gmail.com \
/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®