]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: fix non-MLS handling in mls_context_to_sid()
authorPaul Moore <paul@paul-moore.com>
Wed, 14 Nov 2018 02:44:33 +0000 (21:44 -0500)
committerPaul Moore <paul@paul-moore.com>
Wed, 14 Nov 2018 02:44:33 +0000 (21:44 -0500)
commit8c85c8573cb83de1a285a896a35ca09c3f8239e8
tree1608534267eee0c2f6ecfc200607f16bfa5b2566
parent17e089c8658b131ef922ce4c41e37e056bae5385
selinux: fix non-MLS handling in mls_context_to_sid()

Commit 260c0411eb26 ("selinux: refactor mls_context_to_sid() and make
it stricter") inadvertently changed how we handle labels that did not
contain MLS information.  This patch restores the proper behavior in
mls_context_to_sid() and adds a comment explaining the proper
behavior to help ensure this doesn't happen again.

Fixes: 260c0411eb26 ("selinux: refactor mls_context_to_sid() and make it stricter")
Reported-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/mls.c