]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Smack: Fix wrong semantics in smk_access_entry()
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Thu, 15 Jul 2021 09:17:24 +0000 (17:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:42:00 +0000 (13:42 +0200)
commitd186dd21d55ff057b96929f8f0ac8b0bcf6c6f7f
tree2661f1be7cc3f2e3ac2c873ac157c47972185f5c
parent0fa58e74f917dec31abcb8f7216f05adbbc26381
Smack: Fix wrong semantics in smk_access_entry()

[ Upstream commit 6d14f5c7028eea70760df284057fe198ce7778dd ]

In the smk_access_entry() function, if no matching rule is found
in the rust_list, a negative error code will be used to perform bit
operations with the MAY_ enumeration value. This is semantically
wrong. This patch fixes this issue.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
security/smack/smack_access.c