On Fri, Apr 19, 2019 at 2:28 PM Paul Moore wrote:
>
> On Fri, Apr 19, 2019 at 11:10 AM Wenwen Wang wrote:
> >
> > In audit_rule_change(), audit_data_to_entry() is firstly invoked to
> > translate the payload data to the kernel's rule representation. In
> > audi
, the default case of the switch statement, this
temporary tree is not freed.
To fix this issue, only allocate the tree when the type is AUDIT_ADD_RULE
or AUDIT_DEL_RULE.
Signed-off-by: Wenwen Wang
---
kernel/auditfilter.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --
On Thu, Apr 18, 2019 at 4:52 PM Paul Moore wrote:
>
> On Thu, Apr 18, 2019 at 1:39 PM Wenwen Wang wrote:
> > In audit_rule_change(), audit_data_to_entry() is firstly invoked to
> > translate the payload data to the kernel's rule representation. In
> > audit_data
, the default case of the switch statement, this
temporary tree is not freed.
To fix this issue, only allocate the tree when the type is AUDIT_ADD_RULE
or AUDIT_DEL_RULE.
Signed-off-by: Wenwen Wang
---
kernel/auditfilter.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff
, the default case of the switch statement, this
temporary tree is not freed.
To fix this issue, free the allocated tree in the default case.
Signed-off-by: Wenwen Wang
---
kernel/auditfilter.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 63