android_kernel_asus_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 proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
lockdown lockdown: also lock down previous kgdb use 2022-06-06 08:33:48 +02:00
safesetid LSM: SafeSetID: Stop releasing uninitialized ruleset 2019-09-17 11:27:05 -07:00
selinux selinux: don't use make's grouped targets feature yet 2023-06-09 10:29:02 +02:00
smack Fix incorrect type in assignment of ipv6 port for audit 2022-04-15 14:18:22 +02:00
tomoyo tomoyo: fix broken dependency on *.conf.default 2023-02-06 07:52:35 +01:00
yama proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
commoncap.c capabilities: fix potential memleak on error path from vfs_getxattr_alloc() 2022-11-10 17:57:55 +01:00
device_cgroup.c device_cgroup: Roll back to original exceptions after copy failure 2023-01-18 11:41:50 +01:00
inode.c Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-07-19 10:42:02 -07:00
Kconfig fortify: Explicitly disable Clang support 2021-11-21 13:38:50 +01:00
Kconfig.hardening meminit fix 2019-07-28 12:33:15 -07:00
lsm_audit.c dump_common_audit_data(): fix racy accesses to ->d_name 2021-01-19 18:26:16 +01:00
Makefile security: Add a static lockdown policy LSM 2019-08-19 21:54:15 -07:00
min_addr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
security.c ima: Align ima_file_mmap() parameters with mmap_file LSM hook 2023-03-11 16:44:02 +01:00