Commit 5fb445c2 authored by Tyler Hicks's avatar Tyler Hicks Committed by Yongqiang Liu
Browse files

ima: Have the LSM free its audit rule

stable inclusion
from stable-v4.19.261
commit 7e290764624acfc807a9dae958b3e4ecc550b50c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZXGL


CVE: NA

--------------------------------

commit 9ff8a616 upstream.

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: b1694245 ("ima: use the lsm policy update notifier")
Signed-off-by: default avatarTyler Hicks <tyhicks@linux.microsoft.com>
Cc: Janne Karhunen <janne.karhunen@gmail.com>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: default avatarMimi Zohar <zohar@linux.ibm.com>
Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
Cc: <stable@vger.kernel.org> # 4.19+
Signed-off-by: default avatarGou Hao <gouhao@uniontech.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 926a1eb4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment