]> git.ipfire.org Git - people/arne_f/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 09:41:24 +0000 (11:41 +0200)
commit5aa1de33cb467760853fbd6e84ba57fb8240fa6f
tree005a8441464a7a3cbea27ac65c9d5e63d7cc9565
parentb4c76419ef9329405a7ad261612a42cef905fcbf
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