Skip to content

Commit

Permalink
ima: re-initialize iint->atomic_flags
Browse files Browse the repository at this point in the history
commit e259807 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 0d73a55 ("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>
  • Loading branch information
Mimi Zohar authored and Greg Kroah-Hartman committed Dec 1, 2018
1 parent 166f454 commit 1f89834
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions security/integrity/iint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1f89834

Please sign in to comment.