summaryrefslogtreecommitdiff
authorMimi Zohar <zohar@linux.vnet.ibm.com>2018-01-23 15:00:41 (GMT)
committer Greg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-01 08:44:26 (GMT)
commit1f89834896bb627dd54931519e148ea74ef53d05 (patch)
tree606d6f14c5f41a6a394edc3b554e54a8097cea1d
parent166f4542ec59d1856a558f3b1ec482730c2a9b7f (diff)
downloadcommon-1f89834896bb627dd54931519e148ea74ef53d05.zip
common-1f89834896bb627dd54931519e148ea74ef53d05.tar.gz
common-1f89834896bb627dd54931519e148ea74ef53d05.tar.bz2
ima: re-initialize iint->atomic_flags
commit e2598077dc6a26c9644393e5c21f22a90dbdccdb upstream. Intermittently security.ima is not being written for new files. This patch re-initializes the new slab iint->atomic_flags field before freeing it. Fixes: commit 0d73a55208e9 ("ima: re-introduce own integrity cache lock") Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Signed-off-by: James Morris <jmorris@namei.org> Cc: Aditya Kali <adityakali@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat
-rw-r--r--security/integrity/iint.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/integrity/iint.c b/security/integrity/iint.c
index bc54c16..7ea39b1 100644
--- a/security/integrity/iint.c
+++ b/security/integrity/iint.c
@@ -74,6 +74,7 @@ static void iint_free(struct integrity_iint_cache *iint)
iint->ima_hash = NULL;
iint->version = 0;
iint->flags = 0UL;
+ iint->atomic_flags = 0UL;
iint->ima_file_status = INTEGRITY_UNKNOWN;
iint->ima_mmap_status = INTEGRITY_UNKNOWN;
iint->ima_bprm_status = INTEGRITY_UNKNOWN;