android_kernel_xiaomi_sm8350/security
Tianjia Zhang a249a61ac5 integrity: Fix possible multiple allocation in integrity_inode_get()
commit 9df6a4870dc371136e90330cfbbc51464ee66993 upstream.

When integrity_inode_get() is querying and inserting the cache, there
is a conditional race in the concurrent environment.

The race condition is the result of not properly implementing
"double-checked locking". In this case, it first checks to see if the
iint cache record exists before taking the lock, but doesn't check
again after taking the integrity_iint_lock.

Fixes: bf2276d10c ("ima: allocating iint improvements")
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 08:37:25 +02:00
..
apparmor apparmor: Use pointer to struct aa_label for lbs_cred 2023-01-18 11:41:17 +01:00
integrity integrity: Fix possible multiple allocation in integrity_inode_get() 2023-07-27 08:37:25 +02:00
keys keys: Do not cache key in task struct if key is requested from kernel thread 2023-04-05 11:16:37 +02:00
loadpin
lockdown
safesetid
selinux selinux: don't use make's grouped targets feature yet 2023-06-09 10:29:02 +02:00
smack
tomoyo tomoyo: fix broken dependency on *.conf.default 2023-02-06 07:52:35 +01:00
yama
commoncap.c
device_cgroup.c device_cgroup: Roll back to original exceptions after copy failure 2023-01-18 11:41:50 +01:00
inode.c
Kconfig
Kconfig.hardening
lsm_audit.c
Makefile
min_addr.c
security.c ima: Align ima_file_mmap() parameters with mmap_file LSM hook 2023-03-11 16:44:02 +01:00