linux-stable/security
Richard Haines 55d192691b selinux: allow FIOCLEX and FIONCLEX with policy capability
[ Upstream commit 65881e1db4 ]

These ioctls are equivalent to fcntl(fd, F_SETFD, flags), which SELinux
always allows too.  Furthermore, a failed FIOCLEX could result in a file
descriptor being leaked to a process that should not have access to it.

As this patch removes access controls, a policy capability needs to be
enabled in policy to always allow these ioctls.

Based-on-patch-by: Demi Marie Obenour <demiobenour@gmail.com>
Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
[PM: subject line tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:23:55 +02:00
..
apparmor apparmor: fix error check 2021-11-18 19:16:58 +01:00
bpf bpf: Implement task local storage 2020-11-06 08:08:37 -08:00
integrity EVM: fix the evm= __setup handler return value 2022-04-08 14:23:06 +02:00
keys KEYS: trusted: Avoid calling null function trusted_key_exit 2022-04-08 14:23:09 +02:00
landlock landlock: Use square brackets around "landlock-ruleset" 2022-04-08 14:22:59 +02:00
loadpin LSM: Add "contents" flag to kernel_read_file hook 2020-10-05 13:37:03 +02:00
lockdown Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2020-06-02 17:36:24 -07:00
safesetid LSM: SafeSetID: Mark safesetid_initialized as __initdata 2021-06-10 09:52:32 -07:00
selinux selinux: allow FIOCLEX and FIONCLEX with policy capability 2022-04-08 14:23:55 +02:00
smack smackfs: use netlbl_cfg_cipsov4_del() for deleting cipso_v4_doi 2021-11-18 19:16:39 +01:00
tomoyo TOMOYO: fix __setup handlers return values 2022-04-08 14:23:35 +02:00
yama task_work: cleanup notification modes 2020-10-17 15:05:30 -06:00
commoncap.c Miscellaneous minor fixes for v5.13. 2021-04-27 19:32:55 -07:00
device_cgroup.c device_cgroup: Fix RCU list debugging warning 2020-08-20 11:25:03 -07:00
inode.c
Kconfig fortify: Explicitly disable Clang support 2021-11-21 13:44:13 +01:00
Kconfig.hardening hardening: Clarify Kconfig text for auto-var-init 2021-07-20 23:02:59 -07:00
lsm_audit.c audit: remove unnecessary 'ret' initialization 2021-06-11 13:21:28 -04:00
Makefile security: remove unneeded subdir-$(CONFIG_...) 2021-09-03 08:17:20 +09:00
min_addr.c sysctl: pass kernel pointers to ->proc_handler 2020-04-27 02:07:40 -04:00
security.c LSM: general protection fault in legacy_parse_param 2022-04-08 14:23:54 +02:00