]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
selinux: skip bounded transition processing if the policy isn't loaded
authorPaul Moore <paul@paul-moore.com>
Tue, 5 Dec 2017 22:17:43 +0000 (17:17 -0500)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 28 Feb 2018 14:46:33 +0000 (08:46 -0600)
commita72ddf7c62f86b84f209a31535501f6cb5dc73cc
treed47ceaffbc19eb73e7bb9aa887ebcc75cd28acd8
parent2978403484f9fda9c70206bb9093ea1ae2fe1246
selinux: skip bounded transition processing if the policy isn't loaded

BugLink: http://bugs.launchpad.net/bugs/1752119
commit 4b14752ec4e0d87126e636384cf37c8dd9df157c upstream.

We can't do anything reasonable in security_bounded_transition() if we
don't have a policy loaded, and in fact we could run into problems
with some of the code inside expecting a policy.  Fix these problems
like we do many others in security/selinux/ss/services.c by checking
to see if the policy is loaded (ss_initialized) and returning quickly
if it isn't.

Reported-by: syzbot <syzkaller-bugs@googlegroups.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Reviewed-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
security/selinux/ss/services.c