]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: add proper NULL termination to the secclass_map permissions
authorPaul Moore <paul@paul-moore.com>
Thu, 22 Apr 2021 01:15:36 +0000 (21:15 -0400)
committerPaul Moore <paul@paul-moore.com>
Thu, 22 Apr 2021 01:43:25 +0000 (21:43 -0400)
commit24d741ed1d4f995e24c80d0894ccc2ba244f53f4
tree5e053f548673ac7ca9337646cead3b2c2009d1f2
parenteec788c0cba0a32f5e2cd75ab1dbe50005a0b8c9
selinux: add proper NULL termination to the secclass_map permissions

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: 77860f8bee32 ("selinux: bpf: Add selinux check for eBPF syscall operations")
Fixes: 45f94751191e ("perf_event: Add support for LSM and SELinux checks")
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/include/classmap.h