From: Ondrej Mosnacek <omosnace@redhat.com>
To: selinux@vger.kernel.org, Paul Moore <paul@paul-moore.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
Ondrej Mosnacek <omosnace@redhat.com>
Subject: [PATCH v2 0/2] Fix SELinux context mount with the cgroup filesystem
Date: Fri, 21 Dec 2018 21:18:51 +0100 [thread overview]
Message-ID: <20181221201853.24015-1-omosnace@redhat.com> (raw)
This series contains two bugfixes that fix mounting the cgroup filesystem
with the 'context=' option under SELinux (and potentially other cases as well).
Changes in v2:
- drop first patch (already picked up by cgroups maintainer)
- extract the genfs special handling condition into a separate function
- check for SBLABEL_MNT directly in selinux_inode_setsecurity() and in
selinux_inode_notifysecctx() just translate -ENOTSUPP to 0
v1: https://lore.kernel.org/selinux/20181213141739.8534-1-omosnace@redhat.com/
Note that this series is testable only with patch [1] applied (it has already
been picked up by Tejun Heo, so I dopped it from this series).
The first patch fixes SELinux to always disallow relabeling inodes that
belong to a 'context=' mount.
The second patch fixes SELinux to ignore security_inode_notifysecctx() calls
and disallow security_inode_setsecurity() calls on inodes that belong to
a 'context=' mount.
Testing: Passed selinux-testsuite and verified using the reproducers.
[1] https://lore.kernel.org/selinux/20181213141739.8534-2-omosnace@redhat.com/
Ondrej Mosnacek (2):
selinux: never allow relabeling on context mounts
selinux: do not override context on context mounts
security/selinux/hooks.c | 49 ++++++++++++++++++++++++++++++++--------
1 file changed, 39 insertions(+), 10 deletions(-)
--
2.19.2
next reply other threads:[~2018-12-21 20:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 20:18 Ondrej Mosnacek [this message]
2018-12-21 20:18 ` [PATCH v2 1/2] selinux: never allow relabeling on context mounts Ondrej Mosnacek
2018-12-21 20:42 ` Stephen Smalley
2018-12-21 20:18 ` [PATCH v2 2/2] selinux: do not override context " Ondrej Mosnacek
2018-12-21 20:47 ` Stephen Smalley
2018-12-21 21:49 ` Ondrej Mosnacek
2018-12-21 22:59 ` Paul Moore
2019-01-11 2:28 ` 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=20181221201853.24015-1-omosnace@redhat.com \
--to=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@vger.kernel.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).