]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selinux: beef up isvalid checks
authorChristian Göttsche <cgzones@googlemail.com>
Sun, 11 May 2025 17:30:09 +0000 (19:30 +0200)
committerPaul Moore <paul@paul-moore.com>
Wed, 6 May 2026 23:43:20 +0000 (19:43 -0400)
commit7edea6e8c8e8944e060da6b0b81d66db8d5fffcc
treecbb3632ac6089e2449a4ca8db0d401bb6d480070
parentecf41f6218b58c72f1511e395e480f70a9f44889
selinux: beef up isvalid checks

Check that an ID does not refer to a gap in the global array of
definitions.

Constify parameters of isvalid() function and change return type to
bool.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
[PM: merge fixes, dropped boolean checks due to missing dependency]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/hashtab.h
security/selinux/ss/mls.c
security/selinux/ss/mls.h
security/selinux/ss/policydb.c
security/selinux/ss/policydb.h
security/selinux/ss/services.c
security/selinux/ss/symtab.c
security/selinux/ss/symtab.h