summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2026-08-14 16:35:18 -0400
committerPaul Moore <paul@paul-moore.com>2026-08-31 14:09:27 -0400
commit77d499e61d36e883a6ad1f10afe05f556aa7e0cc (patch)
tree9859df4c0872816cfff2704374576877570917be /tools/lib/python
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
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: 5473a722f782 ("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>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions