linux-stable/security/integrity
Tianjia Zhang 4868a24a4c integrity: Fix possible multiple allocation in integrity_inode_get()
commit 9df6a4870d 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-08-11 11:33:41 +02:00
..
evm evm: Complete description of evm_inode_setattr() 2023-08-11 11:33:33 +02:00
ima ima: Align ima_file_mmap() parameters with mmap_file LSM hook 2023-03-11 16:26:46 +01:00
digsig.c integrity/security: fix digsig.c build error with header file 2018-05-30 07:52:02 +02:00
digsig_asymmetric.c integrity: Small code improvements 2017-06-21 14:37:12 -04:00
iint.c integrity: Fix possible multiple allocation in integrity_inode_get() 2023-08-11 11:33:41 +02:00
integrity.h ima: re-introduce own integrity cache lock 2018-12-01 09:43:00 +01:00
integrity_audit.c integrity: check the return value of audit_log_start() 2022-02-16 12:44:48 +01:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00