]> git.baikalelectronics.ru Git - kernel.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>
Wed, 22 Sep 2021 10:26:27 +0000 (12:26 +0200)
commit91685046dcc205bb99c505a116824eba7e0bee7f
tree3382a4355db8d802b8428ca64ad1b9296b63e1b8
parent8197f5b8963e000c3e2b38d74c82321011756379
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