]> git.baikalelectronics.ru Git - kernel.git/commit
ima: Have the LSM free its audit rule
authorTyler Hicks <tyhicks@linux.microsoft.com>
Thu, 9 Jul 2020 06:19:00 +0000 (01:19 -0500)
committerMimi Zohar <zohar@linux.ibm.com>
Fri, 17 Jul 2020 01:53:55 +0000 (21:53 -0400)
commit363c25aab0dacd71c72a5592be7f0389ada80907
tree0acdb5172013a9860dd91c3ccc2ce9bcbb01c248
parenta33e563849ca40ae29d58ba77b7c2bf8b481862a
ima: Have the LSM free its audit rule

Ask the LSM to free its audit rule rather than directly calling kfree().
Both AppArmor and SELinux do additional work in their audit_rule_free()
hooks. Fix memory leaks by allowing the LSMs to perform necessary work.

Fixes: 5f86188cb18f ("ima: use the lsm policy update notifier")
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Cc: Janne Karhunen <janne.karhunen@gmail.com>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima.h
security/integrity/ima/ima_policy.c