Re: [PATCH 01/12] ima: Have the LSM free its audit rule

From: Mimi Zohar
Date: Thu Jun 25 2020 - 15:41:57 EST


On Mon, 2020-06-22 at 19:32 -0500, Tyler Hicks wrote:
> 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: b16942455193 ("ima: use the lsm policy update notifier")
> Signed-off-by: Tyler Hicks <tyhicks@xxxxxxxxxxxxxxxxxxx>
> Cc: Janne Karhunen <janne.karhunen@xxxxxxxxx>

Reviewed-by: Mimi Zohar <zohar@xxxxxxxxxxxxx>