mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
ccf1dab96b
selinux_set_mnt_opts() relies on the fact that the mount options pointer
is always NULL when all options are unset (specifically in its
!selinux_initialized() branch. However, the new
selinux_fs_context_submount() hook breaks this rule by allocating a new
structure even if no options are set. That causes any submount created
before a SELinux policy is loaded to be rejected in
selinux_set_mnt_opts().
Fix this by making selinux_fs_context_submount() leave fc->security
set to NULL when there are no options to be copied from the reference
superblock.
Cc: <stable@vger.kernel.org>
Reported-by: Adam Williamson <awilliam@redhat.com>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2236345
Fixes:
|
||
---|---|---|
.. | ||
include | ||
ss | ||
.gitignore | ||
avc.c | ||
hooks.c | ||
ibpkey.c | ||
ima.c | ||
Kconfig | ||
Makefile | ||
netif.c | ||
netlabel.c | ||
netlink.c | ||
netnode.c | ||
netport.c | ||
nlmsgtab.c | ||
selinuxfs.c | ||
status.c | ||
xfrm.c |