linux/security/selinux
Paul Moore 77d499e61d selinux: fix BPF token permission checks
Avoid multiple lookups of the bpffs creator SID using the token's file
descriptor when the same information can be found via the resolved
path/dentry (in selinux_bpf_token_create()) or the token itself (in
selinux_bpf_map_create() and selinux_bpf_prog_load()).  Not only does
this simplify the code, it avoids potential TOCTOU issues if the user
changes the token file descriptor passed into the kernel.

Cc: stable@vger.kernel.org
Fixes: 5473a722f7 ("selinux: add support for BPF token access control")
Reviewed-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Tested-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2026-08-31 14:09:27 -04:00
..
include selinux: compute the IMA configuration settings string length once at boot 2026-07-15 21:42:01 -04:00
ss selinux/stable-7.3 PR 20260814 2026-08-19 16:24:46 -07:00
.gitignore selinux: move genheaders to security/selinux/ 2024-10-03 16:07:51 -04:00
avc.c selinux: drop unnecessary goto and label from avc_alloc_node() 2026-07-01 17:42:19 -04:00
genheaders.c selinux: move genheaders to security/selinux/ 2024-10-03 16:07:51 -04:00
hooks.c selinux: fix BPF token permission checks 2026-08-31 14:09:27 -04:00
ibpkey.c selinux: comment spelling fix in ibpkey.c 2026-05-27 20:10:48 -04:00
ima.c selinux: compute the IMA configuration settings string length once at boot 2026-07-15 21:42:01 -04:00
initcalls.c selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
Kconfig selinux: Introduce a new config to make avc cache slot size adjustable 2025-10-23 18:24:30 -04:00
Makefile selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
netif.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
netlabel.c lsm/stable-6.12 PR 20240911 2024-09-16 18:19:47 +02:00
netlink.c selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
netnode.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
netport.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
nlmsgtab.c xfrm: add XFRM_MSG_MIGRATE_STATE for single SA migration 2026-06-04 12:22:47 +02:00
selinuxfs.c selinux: clean up selinuxfs resources on init failure 2026-07-01 17:17:41 -04:00
status.c selinux: avoid implicit conversions regarding enforcing status 2023-07-18 18:29:50 -04:00
xfrm.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00