linux-stable/security
Christian Göttsche 477ed6789e selinux: avoid dereference of garbage after mount failure
commit 37801a36b4 upstream.

In case kern_mount() fails and returns an error pointer return in the
error branch instead of continuing and dereferencing the error pointer.

While on it drop the never read static variable selinuxfs_mount.

Cc: stable@vger.kernel.org
Fixes: 0619f0f5e3 ("selinux: wrap selinuxfs state")
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-10 16:35:48 +02:00
..
apparmor
bpf
integrity
keys
landlock landlock: Warn once if a Landlock action is requested while disabled 2024-04-03 15:28:27 +02:00
loadpin
lockdown
safesetid
selinux selinux: avoid dereference of garbage after mount failure 2024-04-10 16:35:48 +02:00
smack smack: Handle SMACK64TRANSMUTE in smack_inode_setsecurity() 2024-04-03 15:28:16 +02:00
tomoyo tomoyo: fix UAF write bug in tomoyo_write_control() 2024-03-06 14:48:39 +00:00
yama
Kconfig
Kconfig.hardening
Makefile
commoncap.c
device_cgroup.c
inode.c
lsm_audit.c
min_addr.c
security.c lsm: fix the logic in security_inode_getsecctx() 2024-02-23 09:25:02 +01:00