linux-stable/security/selinux
Paul Moore 4c0ddc8712 selinux: add proper NULL termination to the secclass_map permissions
commit e4c82eafb6 upstream.

This patch adds the missing NULL termination to the "bpf" and
"perf_event" object class permission lists.

This missing NULL termination should really only affect the tools
under scripts/selinux, with the most important being genheaders.c,
although in practice this has not been an issue on any of my dev/test
systems.  If the problem were to manifest itself it would likely
result in bogus permissions added to the end of the object class;
thankfully with no access control checks using these bogus
permissions and no policies defining these permissions the impact
would likely be limited to some noise about undefined permissions
during policy load.

Cc: stable@vger.kernel.org
Fixes: ec27c3568a ("selinux: bpf: Add selinux check for eBPF syscall operations")
Fixes: da97e18458 ("perf_event: Add support for LSM and SELinux checks")
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-14 09:49:59 +02:00
..
include selinux: add proper NULL termination to the secclass_map permissions 2021-05-14 09:49:59 +02:00
ss selinux: fix race between old and new sidtab 2021-04-14 08:41:57 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
avc.c selinux: add basic filtering for audit trace events 2020-08-21 17:07:29 -04:00
hooks.c selinux: fix inconsistency between inode_getxattr and inode_listsecurity 2021-03-04 11:38:28 +01:00
ibpkey.c selinux: Fix error return code in sel_ib_pkey_sid_slow() 2020-11-12 20:16:09 -05:00
Kconfig Documentation,selinux: deprecate setting checkreqprot to 1 2020-02-10 10:49:01 -05:00
Makefile selinux: hash context structure directly 2020-04-17 16:04:34 -04:00
netif.c selinux: Fix spelling mistakes in the comments 2020-07-08 12:15:52 -04:00
netlabel.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
netlink.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
netnode.c selinux: Fix spelling mistakes in the comments 2020-07-08 12:15:52 -04:00
netport.c selinux: Fix spelling mistakes in the comments 2020-07-08 12:15:52 -04:00
nlmsgtab.c net: bridge: vlan: add rtm definitions and dump support 2020-01-15 13:48:17 +01:00
selinuxfs.c selinux: fix variable scope issue in live sidtab conversion 2021-03-30 14:31:53 +02:00
status.c selinux: move status variables out of selinux_ss 2020-02-10 10:49:01 -05:00
xfrm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00