linux-stable/Documentation
Paul Moore f22f9aaf6c selinux: remove the runtime disable functionality
After working with the larger SELinux-based distros for several
years, we're finally at a place where we can disable the SELinux
runtime disable functionality.  The existing kernel deprecation
notice explains the functionality and why we want to remove it:

  The selinuxfs "disable" node allows SELinux to be disabled at
  runtime prior to a policy being loaded into the kernel.  If
  disabled via this mechanism, SELinux will remain disabled until
  the system is rebooted.

  The preferred method of disabling SELinux is via the "selinux=0"
  boot parameter, but the selinuxfs "disable" node was created to
  make it easier for systems with primitive bootloaders that did not
  allow for easy modification of the kernel command line.
  Unfortunately, allowing for SELinux to be disabled at runtime makes
  it difficult to secure the kernel's LSM hooks using the
  "__ro_after_init" feature.

It is that last sentence, mentioning the '__ro_after_init' hardening,
which is the real motivation for this change, and if you look at the
diffstat you'll see that the impact of this patch reaches across all
the different LSMs, helping prevent tampering at the LSM hook level.

From a SELinux perspective, it is important to note that if you
continue to disable SELinux via "/etc/selinux/config" it may appear
that SELinux is disabled, but it is simply in an uninitialized state.
If you load a policy with `load_policy -i`, you will see SELinux
come alive just as if you had loaded the policy during early-boot.

It is also worth noting that the "/sys/fs/selinux/disable" file is
always writable now, regardless of the Kconfig settings, but writing
to the file has no effect on the system, other than to display an
error on the console if a non-zero/true value is written.

Finally, in the several years where we have been working on
deprecating this functionality, there has only been one instance of
someone mentioning any user visible breakage.  In this particular
case it was an individual's kernel test system, and the workaround
documented in the deprecation notice ("selinux=0" on the kernel
command line) resolved the issue without problem.

Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2023-03-20 12:34:23 -04:00
..
ABI selinux: remove the runtime disable functionality 2023-03-20 12:34:23 -04:00
accel
accounting
admin-guide A small set of updates for x86: 2023-03-05 11:27:48 -08:00
arc
arm
arm64 arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
block block: stub out and deprecated the capability attribute on the gendisk 2023-02-06 08:44:55 -07:00
bpf Documentation: bpf: Add missing line break separator in node_data struct code block 2023-02-15 08:43:51 -08:00
cdrom
core-api - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
cpu-freq
crypto
dev-tools - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
devicetree sound fixes for 6.3-rc1 2023-03-04 10:53:59 -08:00
doc-guide
driver-api media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
fault-injection docs: fault-injection: add requirements of error injectable functions 2023-02-02 22:50:00 -08:00
fb
features m68k: Add kernel seccomp support 2023-01-30 16:40:15 +01:00
filesystems f2fs-for-6.3-rc1 2023-02-27 16:18:51 -08:00
firmware-guide Documentation: firmware-guide: gpio-properties: Clarify Explicit and Implicit 2023-02-14 15:50:09 +01:00
firmware_class
fpga
gpu drm next for 6.3-rc1 2023-02-22 18:28:03 -08:00
hid It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
hwmon It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
i2c Documentation: i2c: correct spelling 2023-02-15 20:59:44 +01:00
ia64
iio
images
infiniband
input
isdn Documentation: isdn: correct spelling 2023-02-10 16:28:13 -08:00
kbuild Kbuild updates for v6.3 2023-02-26 11:53:25 -08:00
kernel-hacking
leds - Remove Drivers 2023-02-23 15:09:31 -08:00
litmus-tests
livepatch Documentation: livepatch: module-elf-format: Remove local klp_modinfo definition 2023-02-06 08:45:55 -08:00
locking docs: locking: refer to the actual existing config names 2023-02-23 12:26:00 -07:00
loongarch
m68k
maintainer
mhi
mips
misc-devices
mm - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
netlabel
netlink netdev-genl: fix repeated typo oflloading -> offloading 2023-02-24 11:01:16 +00:00
networking Including fixes from wireless and netfilter. 2023-02-27 14:05:08 -08:00
nios2
nvdimm
nvme
openrisc
parisc
PCI
pcmcia
peci
power Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
powerpc
process A handful of documentation patches that were ready before the merge window, 2023-02-28 16:01:08 -08:00
RCU
riscv Documentation: riscv: fix insufficient list item indent 2023-02-14 16:00:02 -08:00
rust Documentation: rust: Fix arch support table 2023-02-13 10:14:32 +01:00
s390 VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
scheduler RISC-V Patches for the 6.3 Merge Window, Part 1 2023-02-25 11:14:08 -08:00
scsi SCSI misc on 20230222 2023-02-22 13:41:41 -08:00
security
sh
sound It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
sparc Documentation: sparc: correct spelling 2023-02-02 11:07:02 -07:00
sphinx docs: Use HTML comments for the kernel-toc SPDX line 2023-02-16 16:06:44 -07:00
sphinx-static docs: Add more information to the HTML sidebar 2023-02-08 13:28:27 -07:00
spi
staging
target scsi: target: Documentation: Correct spelling 2023-02-08 18:49:48 -05:00
timers
tools Documentation/rtla: Add hwnoise man page 2023-02-13 23:56:46 -05:00
trace Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
translations A handful of documentation patches that were ready before the merge window, 2023-02-28 16:01:08 -08:00
usb usb: gadget: configfs: Support arbitrary string descriptors 2023-02-07 08:46:36 +01:00
userspace-api media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
virt ARM: 2023-02-25 11:30:21 -08:00
w1
watchdog Documentation/watchdog/hpwdt: Fix Format 2023-02-16 17:31:29 -07:00
x86 It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
xtensa
.gitignore
arch.rst
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
docutils.conf
dontdiff
index.rst Documentation: front page: use recommended heading adornments 2023-02-23 12:44:51 -07:00
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst